![](/img/trans.png)
[英]Problem with loading a third party jar inside a spring boot application
[英]@Value inside class file in third party jar spring boot
我正在將舊的基於 Spring XML 配置的應用程序遷移到 Spring Boot,並且有第三方 jars 具有@Value("$
引用的屬性。我嘗試加載放置在新 Spring 中的/resources
下的自定義屬性文件啟動工作區並使用@PropertySource("classpath:file")
加載它,但在 Spring Boot 運行期間,似乎沒有加載該屬性並出現以下錯誤:
Could not resolve placeholder 'com.example.propertyName' in value "${com.example.propertyName}"
at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:178)
~[spring-core-5.2.2.RELEASE.jar:5.2.2.RELEASE]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.