0
Grails 2では、Config.groovy
ファイルに次のコードブロックがありました。 ConfigurationManagement
クラスは、構成管理データベースでランタイムルックアップを実行して、パラメータがtrue
またはfalse
である必要があるかどうかを判断しました。同様の設定を使用して、追加のQuartzプロパティをロードしました。Grailsでの動的石英設定3
quartz {
def autoStartupOnTheseServers = ConfigurationManagement.getValue("myApp.quartz.autoStartupOnTheseServers", "").split(",")
if (autoStartupOnTheseServers.any { it.trim().toUpperCase() == hostName.toUpperCase() }) {
autoStartup = true
}
else {
autoStartup = false
}
// Default for clustering (jdbcStore) has to be "false" so the app will run locally.
// Clustering (jdbcStore) will be true for DEV, TEST, QA, and PROD (set by Configuartion Management).
jdbcStore = ConfigurationManagement.getValue("myApp.quartz.jdbcStore", "false").toBoolean()
// don't set the props if not enabling quartz clustering...causes an exception.
if(jdbcStore == true) { props(quartzProps) }
}
のGrails 3において、application.groovy
で使用される同様のコードは動作せず、私はapplication.yml
を見つけることができる条件文のための任意の設備がありません。 Grails 3に同様の動的設定を行う方法はありますか?