![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
springboot
文章平均质量分 64
别选瑶了
这个作者很懒,什么都没留下…
展开
-
一、Spring Boot之入门案例详解
springboot基础入门官方文档:https://docs.spring.io/spring-boot/docs/2.4.2/reference/html/getting-started.html#getting-started1、SpringBoot优点Create stand-alone Spring applications创建独立Spring应用Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR原创 2021-01-20 13:53:47 · 461 阅读 · 0 评论 -
二、Springboot - 自动配置原理入门之基本注解分析
官方文档:https://docs.spring.io/spring-boot/docs/2.4.2/reference/html/getting-started.html#getting-started1、自动配置之Configuration注解详解该注解其实就是完全替代了之前mvc中得xml文件。标注给类此工程的配置类,需要注意的是给容器注册组件默认为单例模式注解可配置为boolean proxyBeanMethods() default true,SpringBoot总会检查这个组件是否在原创 2021-01-20 16:15:06 · 431 阅读 · 0 评论 -
三、Spring Boot之源码解析(自动配置)
思维导图1、@SpringBootConfiguration@Configuration。代表当前是一个配置类1、@ComponentScan指定扫描哪些,Spring注解;3、@EnableAutoConfiguration@AutoConfigurationPackage@Import(AutoConfigurationImportSelector.class)public @interface EnableAutoConfiguration {}1.1、@AutoConfigur原创 2021-01-20 22:45:49 · 403 阅读 · 0 评论 -
四、springboot之源码分析(静态资源)
1、静态资源访问1.1、静态资源目录只要静态资源放在类路径下: called /static (or /public or /resources or /META-INF/resources访问 : 当前项目根路径/ + 静态资源名原理: 静态映射/**。请求进来,先去找Controller看能不能处理。不能处理的所有请求又都交给静态资源处理器。改变默认的静态资源路径spring: mvc: static-path-pattern: /res/** resources: .原创 2021-01-21 22:39:26 · 527 阅读 · 0 评论 -
五、springboot之整合rest代码实现及源码分析(Rest风格)
1、代码实现java代码实现@RestControllerpublic class UserController { @RequestMapping(value = "/user",method = RequestMethod.GET) public String getUser(){ return "我是GET"; } @RequestMapping(value = "/user",method = RequestMethod.POST)原创 2021-01-23 00:01:26 · 570 阅读 · 0 评论