![](https://img-blog.csdnimg.cn/6266b2ee822044e2b579af2f2bafdff2.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Spring Boot
文章平均质量分 55
Spring Boot学习
debug4flaw
我们不产生bug,我们只是bug的搬运工。
展开
-
【Spring Boot】在properties配置文件中获取pom文件中的参数
简单的spring boot小项目,maven打包,需要带上环境参数,来区别不同环境的jar包,spring boot的配置也不要修改。简便开发,即每次打包,只需要修改pom文中环境自定义参数即可。application.properties文件配置。......原创 2022-08-06 11:01:56 · 1330 阅读 · 0 评论 -
【Spring Boot】静态的简单类型属性绑定值
一、非静态属性最为简单,把类注册到容器中,使用@Value或@ConfigurationProperties把配置文件中属性绑定。二、静态属性spring不支持静态属性的注入,需要自行实现。1、@PostConstruct@Componentpublic class HConfig { public static String url; @Autowired Environment environment; @PostConstruct public原创 2022-04-17 16:53:39 · 613 阅读 · 0 评论