java - External configuration of non controller or taglib classes -
i'm trying create external configuration non controller or taglib class because values need change without recompile. configurationholder , applicationholder deprecated options this?
i've done 3 hours of googling , seems thing has come since classes have been deprecated using di. however, need configuration external of war file somehow don't know if me unless i'm missing something?
thanks
based on response got js3v recommend looking @ settings plugin. gives nice way enter these types of items , basic crud interface manage them. can have string, integer, date , bigdecimal types. can create names segment them (like admin.email.defaultgreeting
, or banking.defaultinterestrate
) , access them in gsp's or controllers/services/domain classes this:
//gsp <g:setting valuefor="admin.email.defaultgreeting" default="hello!" encodeas="html"/> //other import org.grails.plugins.settings.* setting.valuefor("admin.email.defaultgreeting", "hello!")
Comments
Post a Comment