springboot
文章平均质量分 56
springboot
ggLee0129
这个作者很懒,什么都没留下…
展开
-
springboot
一、一个配置文件:不推荐# 默认激活dev配置spring: profiles: active: "dev"---spring: config: activate: on-profile: "dev"desc: this is dev environment---spring: config: activate: on-profile: "test"desc: this is test environment--原创 2021-03-30 08:10:48 · 125 阅读 · 0 评论 -
springboot自动装配
一、约定大于配置严格遵守springboot的约定,则不需要进行配置,简化配置如静态资源路径,springboot默认 依次去classpath:/resources/、classpath:/static/、classpath:/public/下面加载静态资源,你把静态资源放在对应目录即可,不需像springmvc需要配置静态资源路径,如果你不遵守约定,放在别的地方,则访问不到二、自动装配1. @SpringBootApplication 注解标注springboot启动类@Spring原创 2021-03-29 14:05:53 · 185 阅读 · 0 评论