Skip to content

模块中使用@Value("${app.name}")注入失败 #130

@Today0219

Description

@Today0219

Your question

模块中使用@value("${app.name}")注入参数失败,这个大家是怎么处理的。我现在是打算一个服务模块一个配置文件,用一个GlobalConfig去维护这些配置
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'globalConfig': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'app.name' in value "${app.name}"
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions