![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
个人博客
文章平均质量分 52
qq_34244429
这个作者很懒,什么都没留下…
展开
-
springboot拦截器提取@Value属性值时为空的解决方案。
@EnableWebMvc@Configurationpublic class WebConfig extends WebMvcConfigurerAdapter {@Beanpublic LocaleInterceptor localeInterceptor() {return new LocaleInterceptor();}@Overridepublic void addIntercepto...原创 2018-04-02 09:14:44 · 8459 阅读 · 0 评论 -
springboot 使用属性文件,自定义常量方案
引言:常量定义在application.properties文件里面也可以;当然,用@Value 取值也可以。但是,有时候我们要自己定义一个常量文件,那怎么读取这个属性文件的值呢? 下面就贡献一下我的探索吧。1.定义一个存放常量的properties文件# REDIS_LOGIN_TOKENcom.login.token = tokencom.login.tokenExpire = 180002....原创 2018-04-02 09:20:35 · 8308 阅读 · 0 评论