Skip to content

《芋道 Spring Boot 监控端点 Actuator 入门》5.1 无法解析yaml文件中的 @占位符 #11

Open
@yuyong725

Description

@yuyong725

问题:启动报错,无法解析@占位符内容
我理解的是 yaml 是使用 ${} 解析占位资源,如果使用@,需要特殊配置,actuator官方文档示例使用的也是 @ 占位符,不清楚是不是内部针对Spring的配置文件解析做了特殊处理,我使用芋艿的info模块的代码是启动不了,最终通过如下的方式解决:

<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <version>2.6</version>
           <configuration>
                    <delimiters>
                        <delimiter>@</delimiter>
                    </delimiters>
                    <useDefaultDelimiters>false</useDefaultDelimiters>
           </configuration>
</plugin>    

但这种方式我理解的是maven的处理机制,与actuator无关,不知道是不是我actuator配置不对

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions