前言:配置还是太多了,不想搞配置了,为了快速开发,选择了SpringBoot,也就是Spring组织下的一个集成spring和springmvc以及tomcat等的项目,然后默认配置很多东西,约定大于配置
SpringBoot快速入门
注解解释
@RestController 就是@Controller和@ResponseBody 组合
@GettingMaping 就是@RequestMapping添加了method为GET
@SpringBootConfiguration 表示当前是springboot的配置 组合注解
@Configuration 表示为配置类 在springboot中如果需要添加配置的时候可以使用这个注解
@Indexed 索引
@EnableAutoConfiguration 启动自动配置
@ComponentScan 组件扫描,类型xml中的component-scan 标签,从当前类的包开始扫描,包含当前包以及子包
2023/10/6大约 2 分钟
