placeholder 'project.version' in value "${project.version}
问题描述
2019-11-11 16:19:52.220 ERROR [tools-uaa,,,] 23451 --- [-127.0.0.1_9999] c.a.nacos.client.config.impl.CacheData : [fixed-127.0.0.1_9999] [notify-error] dataId=tools-uaa-dev.yaml, group=DEFAULT_GROUP, md5=370536943e53234c0df2eba4c203db14, listener=org.springframework.cloud.alibaba.nacos.refresh.NacosContextRefresher$1@4345817a tx={}
java.lang.IllegalArgumentException: Could not resolve placeholder 'project.version' in value "${project.version}"
at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:178) ~[spring-core-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:124) ~[spring-core-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:236) ~[spring-core-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:210) ~[spring-core-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.core.env.AbstractEnvironment.resolveRequiredPlaceholders(AbstractEnvironment.java:573) ~[spring-core-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at java.util.Optional.map(Optional.java:215) ~[na:1.8.0_191]
at com.ulisesbocchio.jasyptspringboot.resolver.DefaultPropertyResolver.resolvePropertyValue(DefaultPropertyResolver.java:38) ~[jasypt-spring-boot-2.1.2.jar:na]
at com.ulisesbocchio.jasyptspringboot.resolver.DefaultLazyPropertyResolver.resolvePropertyValue(DefaultLazyPropertyResolver.java:42) ~[jasypt-spring-boot-2.1.2.jar:na]
at com.ulisesbocchio.jasyptspringboot.EncryptablePropertySource.getProperty(EncryptablePropertySource.java:20) ~[jasypt-spring-boot-2.1.2.jar:na]
at com.ulisesbocchio.jasyptspringboot.caching.CachingDelegateEncryptablePropertySource.lambda$getProperty$0(CachingDelegateEncryptablePropertySource.java:34) ~[jasypt-spring-boot-2.1.2.jar:na]
at org.springframework.cache.concurrent.ConcurrentMapCache.lambda$get$0(ConcurrentMapCache.java:146) ~[spring-context-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) ~[na:1.8.0_191]
at org.springframework.cache.concurrent.ConcurrentMapCache.get(ConcurrentMapCache.java:144) ~[spring-context-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at com.ulisesbocchio.jasyptspringboot.caching.CachingDelegateEncryptablePropertySource.getProperty
问题出现的环境背景及自己尝试过哪些方法
<spring-boot.version>2.2.2.BUILD-SNAPSHOT</spring-boot.version>
<spring-cloud.version>Hoxton.BUILD-SNAPSHOT</spring-cloud.version>
<spring-cloud-alibaba.version>0.9.0.RELEASE</spring-cloud-alibaba.version>
相关代码
// 请把代码文本粘贴到下方(请勿用图片代替代码)
你期待的结果是什么?实际看到的错误信息又是什么?
我怀疑是版本问题,nacos总是去获取project.verison
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
已解决,pom里有个依赖不兼容。
删除就行了