springboot(三 使用mybatis +springboot 完成简单的增删改查)
先说一些注解: @EnableAutoConfiguration 可以帮助SpringBoot应用将所有符合条件的 @Configuration 配置都加载到当前SpringBoot创建并使用的IoC容器。 @ComponentScan 扫包 @Configuration 用于定义配置类,可替换xml配置文件 使用以上是三个注解 则可以实现 springboot 的启动类的功能,不过每次 写的太得 所以 可以使用@SpringBootApplication 代替三个注解,实现启动类功能 @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Documented @Inherited @SpringBootConfiguration @EnableAutoConfiguration @ComponentScan(excludeFilters = { @Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter. class ), @Filter(type = FilterType.CUSTOM, classes = AutoConfigurationExcludeFilter. class ) }) public @ interface