#Annotation

让 @PropertySource 注解支持加载 yml 配置文件

2024年07月05日 by emanjusaka 阅读 101 点赞 0

让 @PropertySource 注解支持加载 yml 配置文件

@PropertySource 默认只支持 properties 文件和 xml 文件,并不能加载 yml 或 yaml。我们可以通过自定义资源加载的工厂指定 yml 加载器去加载 yml 的配置文件。

阅读全文…

标签: Annotation , Java , Spring , yml

发布在 Spring

微知识:@ConfigurationProperties 失效的一种特殊情况

2024年03月29日 by emanjusaka 阅读 322 点赞 0

标签: SpringBoot , Annotation

发布在 微知识

微知识:@PathVariable 注解

2024年03月27日 by emanjusaka 阅读 62 点赞 0

标签: Annotation , Springmvc

发布在 微知识