在我的項目中我有一個基於Spring Boot的庫,爲我提供了一些常用的服務。在Spring Boot項目中,我使用庫並在嘗試檢索某些外部配置時遇到一些問題。 庫「讀取」AssetServiceProperties中的某些外部配置。 @ConfigurationProperties("service.assets")
public class AssetServiceProperties {
我有一個配置,它的@Import - 由註釋。我希望配置可以訪問註釋中的值。這可能嗎? 配置: @Configuration
public class MyConfig
{
@Bean
public CacheManager cacheManager(net.sf.ehcache.CacheManager cacheManager)
{
//Get t