Comments (5)
首先帮你修改了下 issue 的规范,下次贴异常信息 麻烦使用下面的语法
```java
异常信息
```
其次,请问你是哪个模块报出的错误呢?根据日志,是 properties 模块,但是还是希望得到准确的异常信息
from spring-boot-demo.
异常信息如下:
Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'applicationProperty': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'application.name' in value "${application.name}"
就是在
public class ApplicationProperty {
@Value("${application.name}")
private String name;
@Value("${application.version}")
private String version;
}
@Value("${application.name}")
这个无法注册
from spring-boot-demo.
第一,你的 ApplicationProperty
这个类上添加 @Component
和 @Data
注解了吗?
第二,你的 application.yml
配置文件添加如下信息了吗?
application:
name: prod环境 @artifactId@
version: prod环境 @version@
from spring-boot-demo.
非常感谢,能在百忙之中给我回信息,由于对springboot不是太熟悉,一直在摸索,由于少加
spring:
profiles:
active: prod
已经解决了。
from spring-boot-demo.
没事,能解决问题就行,还有就是下次的提问,建议学学 markdown 的语法多学习下,几乎你的每个回复我都得改一遍 。 。。加油~
from spring-boot-demo.
Related Issues (20)
- 时序数据库集成几个呗 HOT 2
- [FEATURE] HOT 1
- 集成JOOQ HOT 1
- 生产环境不能修改host怎么办呢? HOT 2
- [BUG] demo-orm-jdbctemplate 中,日志打印问题 HOT 3
- [BUG] 使用HashMap for DATASOURCE_CACHE in DatasourceHolder.java
- [README错误]demo-template-beetl模块README文件后缀错误
- [demo-orm-jdbctemplate]BaseDao.getField()方法未正确过滤主键
- 集成Sa token
- [BUG] HOT 3
- 希望添加的demo
- suggest new_adding HOT 1
- minio
- 可以出一个 Camunda 的实例吗
- [FEATURE] 可以来一个JPA版本的 spring-boot-demo-dynamic-datasource 吗
- md里图片问题 HOT 1
- [BUG] demo-orm-mybatis-plus 模块启动报错 HOT 1
- [BUG] 请问demo-rbac-shiro是否未完成?
- [BUG] demo-websocket 系统架构显示都是AMD64 HOT 1
- 希望增加graphql的集成demo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-boot-demo.