SpringBoot类上面的注解

(1)@Repository

(2)@Service 

(3)@Controller

(4)@Component (可以用于(1)、(2)、(3)三种情况)

@Configuration标注在类上,相当于把该类作为spring的xml配置文件中的<beans>

猜你喜欢

转载自blog.csdn.net/g1607058603/article/details/89542694
今日推荐