随笔分类 - spring / springboot
摘要:自动配置工程 绑定配置文件,上逼格的 start 都支持自定义配置,我们也装像点~~ @ConfigurationProperties("cyrus.hello") public class CyrusHelloProperties { // 绑定配置文件 cyrus.hello.username
阅读全文
摘要:@SpringBootApplication 发现是一个复合注解 @SpringBootConfiguration、@EnableAutoConfiguration、@ComponentScan 由三个注解组合而来 @Target(ElementType.TYPE) @Retention(Reten
阅读全文
摘要:都是 spring 支持的,@Import 我也是从 spring 的文章张直接复制出来的,那边文章详细解释了 bean 的方方面面,感兴趣可以去看 @Configuration、@Bean 相当于 spring 的配置文件,spring 在配置文件中可以配置 bean,用注解方式就是这样的 //
阅读全文
摘要:依赖管理 父项目(一直网上找)spring-boot-dependencies 决定了当前 springboot 预先配置的所有依赖及版本 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dep
阅读全文