【发布时间】:2016-11-03 04:09:36
【问题描述】:
为什么我们在使用 spring-boot -starter-jersey 项目时需要为 Jersey 资源注解“@Component”?
如果我删除它,Jersey servlet 仍然可以提供资源。
那么“@Component”有什么用呢?
【问题讨论】:
-
只要你想注入其他 Spring 组件,资源也必须是 Spring 组件。
标签: spring spring-boot jersey spring-annotations