SpringBoot 加载自定义配置

在resources目录下自定义配置,若是让springboot加载呢?能够使用@PropertySource("classpath:goods.md") 完成,goods.md就是一个自定义配置,能够设置为本身的配置。java 以下展现3种使用方式:web 方式一:spring goods.mdspringboot goods.id=1 goods.name=a GoodsController.
相关文章
相关标签/搜索