
附上我的屏幕截图,这是入门级rest类,其中使用了@Component。为什么使用@Component?
我浏览了下面的博客http://www.benchresources.net/jersey-2-x-web-service-integrating-with-spring-framework-using-annotation/
发布于 2019-02-26 13:23:47
使用@Component、@Resource、@Service是因为您仍在使用spring框架应用程序进行依赖注入,特别是通过组件扫描链接到找到的类,并且您希望它能够在您提供服务或dao类时自动绑定spring组件
https://stackoverflow.com/questions/54878803
复制相似问题