Spring Boot 使用parent方式引用時 獲取值屬性方式默認@

採用官網提供的 引入依賴時,application.properties中的值變量,沒法經過${}獲取,這是因爲Spring Boot 已經將字符方式調整爲 <resource.delimiter>@</resource.delimiter>。故若是在,工程中仍想使用${},需加入spring

<properties>
<resource.delimiter>${}</resource.delimiter>
</properties>
<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.4.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
	```
相關文章
相關標籤/搜索