springboot自定义starter
摘要:starter的定义:为了把第三方集成到springboot中,并且把第三方工具的实例融入到ioc中,并且可以去支持外部自定义的配置(一般在application.properties中配置)。 新建一个maven项目: 一般官方的starter是spring-boot-starter-{name}
阅读全文
Springboot核心注解
摘要:运行文中的代码需要在项目构建中引入springboot 相关依赖. ① @configuration configuration,用来将bean加入到ioc容器。代替传统xml中的bean配置。代码示例: 定义一个普通类: public class Person { } 定义一个配置类,用来将此类注
阅读全文