私はMyApp
というアプリケーションを1つのプロジェクトにMyAppProperties
、もう1つのプロジェクトにCommonProperties
と表示しています。両方のプロパティクラスには@ConfigurationProperties
という注釈が付けられています。私はまた私のpom.xmlにこの依存関係を追加した春のCDFに一部のプロパティが表示されない
configuration-properties.classes=com.app.MyAppProperties, \
com.common.CommonProperties, \
org.springframework.boot.autoconfigure.data.redis.RedisProperties, \
org.springframework.boot.autoconfigure.data.redis.RedisProperties$Pool, \
org.springframework.boot.autoconfigure.data.redis.RedisProperties$Sentinel
:私はMyApp
プロジェクトに次の内容のMETA-INF/spring-configuration-metadata-whitelist.properties
を追加
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
しかし、私はCDFの流れに少しホイールをクリックしたとき作成GUI私はMyAppProperties
とすべてRedisProperties
を見ることができますが、CommonProperties
はありません。
app info --id processor:myapp
と同じ結果がdataflow-shell
から得られます。
私には何が欠けていますか?
DSLを使ってアプリケーションに 'CommonProperties'を渡すことができます。たとえば:' --common.value = 5'と 'MyApp'の起動時に実際にそれを見て依存関係が働いているだけですそれが利用可能と表示されていません。 – aturkovic