月度归档: 2026 年 9 月

3 篇文章

SpringBoot2 自动配置入门
SpringBoot2 自动配置入门 自动包规则原理: @SpringBootApplication是一个融合注解,相当于: @SpringBootConfiguration @EnableAutoConfiguration @ComponentScan @SpringBootConfiguration就是声明这是一个配置类,@ComponentS…
SpringBoot2 底层注解
SpringBoot2 底层注解 @Configuration注解: Spring中: bean 包放数据类,比如 User、Pet。 config 包放配置类,比如 MyConfig,用来告诉 Spring 创建哪些对象。 @Configuration注解:标在类上,表示这个类是一个“配置类”,即专门用来告诉 Spring 应该创建哪些对象、怎么…
基础入门
springboot2基础入门: spring与springboot : 总体来说,Spring 是一个 Java 开发框架,提供依赖注入、AOP、事务、MVC、数据访问等基础能力。 Spring Boot 是基于 Spring 的快速开发框架,用来简化 Spring 项目的配置、启动和部署。 spring能做什么: spring其实是一整个生态圈…