spring在非controller里使用service层的注解

       在SpringMVC框架中,经常要使用@Autowired注解注入Service接口,在controller层中注入service接口,在service层中注入其它的service接口或者mapper接口都是可以的,但是如果在自己封装的Utils工具类中或者非controller普通类中使用@Autowired注解注入Service或者Mapper接口,直接注入是不可能的,因为Uti
相关文章
相关标签/搜索