springboot
看写写
精通c编程,熟悉linux 平台
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Spring 请求添加 cache
Spring 添加 Etag标签 /** * Etag * @return */ @Bean public FilterRegistrationBean filterRegistrationBean () { ShallowEtagHeaderFilter eTagFilter = new ShallowEtagHeaderFilter(); //设置为weakETag,默认为false // eTagFilter.setWriteWeakETag(t原创 2020-12-08 20:16:26 · 342 阅读 · 0 评论 -
maven profile 和 spring boot profile的区别
maven profile 配置 1, application.yml spring: profiles: active: #打包时需要修改此属性,需区分引用dev uat prod等环境的配置文件 - @profileActive@ 2, pom.xml <!--配置多环境打包--> <profiles> &a原创 2018-11-18 10:28:54 · 2446 阅读 · 0 评论 -
spring boot,yml文件配置的自己见解
关于spring boot,yml文件配置的自己见解 使用场景 如果项目中存在大量重复的代码,大量重复指的是大量的if else 或者逻辑上的大量判断 就不要在程序里面进行处理了,这样不仅造成代码的兼容性很低,而且可读性更低,维护代价巨大无比。 通过java万物皆对象的思想,把这些数据进行抽象到配置文件中,然后通过读配置文件来进行处理。 这样如果有新的模型需要处理,添加配置文件或者修改配置文件就...原创 2018-11-18 11:18:29 · 2606 阅读 · 0 评论
分享