![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
框架
种向日葵的小仙女
这个作者很懒,什么都没留下…
展开
-
Spring中的注解
1、@component (把普通pojo实例化到spring容器中,相当于配置文件中的<bean id="" class=""/>) 共同点:被@controller 、@service、@repository 、@component 注解的类,都会把这些类纳入进spring容器中进行管理。 2、@Slf4j 如果不想每次都写private final Logger log...原创 2019-07-10 20:43:10 · 343 阅读 · 0 评论 -
spring boot 配置总结
1、@value 单个配置 2、@Component @ConfigurationProperties 如果配置项很多,之间还有联系,把这些配置放到一个类里面去 用@Autowired让 limitConfig的实体bean注入到HelloController里面,让HelloController可以使用 limitConfig里面的方法。 ...原创 2019-07-10 20:59:14 · 318 阅读 · 0 评论