1.springboot优缺点
优点
1. 快速构建项目
2. 对主流开发框架的无配置集成
3. 项目可独立运行,无需外部依赖servlet容器
4. 提供运行时的应用监控
5. 与云计算天然集成
缺点
1. 参考资料 不够深入
闲话少说。。。。。
1.在idea中创建springboot
之后点击next
2.
springboot的启动类,通常*Application命名
3.@SpringBootApplication
@SpringBootApplication是springboot的核心注解,是一个组合注解
源码如下
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@SpringBootConfiguration
@EnableAutoConfiguration--》让springboot的jar包依赖进行自动配置
@ComponentScan(excludeFilters = @Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter.class))
public @interface SpringBootApplication {