美文网首页
SpringBoot使用PropertiesLoaderUtil

SpringBoot使用PropertiesLoaderUtil

作者: 飞鹩 | 来源:发表于2022-05-05 15:55 被阅读0次

一、编写读取properties文件的类PropertiesListenerConfig

二、编写监听器,实现ApplicationListener类

三、将监听器加到启动类的监听器上

codemessage.properties文件

使用:PropertiesListenerConfig.getProperty("200")

相关文章

网友评论

      本文标题:SpringBoot使用PropertiesLoaderUtil

      本文链接:https://www.haomeiwen.com/subject/oxxoyrtx.html