Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring mvc 为什么Jersey在与spring框架集成时使用@Component、@Resource、@Service?_Spring Mvc_Jax Rs - Fatal编程技术网

Spring mvc 为什么Jersey在与spring框架集成时使用@Component、@Resource、@Service?

Spring mvc 为什么Jersey在与spring框架集成时使用@Component、@Resource、@Service?,spring-mvc,jax-rs,Spring Mvc,Jax Rs,附上我的屏幕截图,这是入门级rest类,其中使用@Component。为什么使用@Component 我浏览了下面的博客 @Component、@Resource、@Service之所以使用,是因为您仍在使用spring framework应用程序进行依赖项注入,特别是通过组件扫描链接到找到的类,并且希望它能够在您服务或dao类时自动连接spring组件,@Service之所以使用,是因为您仍在使用spring framework应用程序进行依赖项注入,特别是通过组件扫描链接到找到的类,并且您希

附上我的屏幕截图,这是入门级rest类,其中使用@Component。为什么使用@Component

我浏览了下面的博客

@Component、@Resource、@Service之所以使用,是因为您仍在使用spring framework应用程序进行依赖项注入,特别是通过组件扫描链接到找到的类,并且希望它能够在您服务或dao类时自动连接spring组件,@Service之所以使用,是因为您仍在使用spring framework应用程序进行依赖项注入,特别是通过组件扫描链接到找到的类,并且您希望它能够在服务或dao类时自动连接spring组件