Can't Autowire ServletContext

后端 未结 3 1540
夕颜
夕颜 2020-12-20 11:50

I\'m new with Spring, and I\'m trying to use the @Autowire annotation for the ServletContext with my class attribute:

@Controller
public class ServicesImpl i         


        
3条回答
  •  醉话见心
    2020-12-20 12:28

    You'll probably want to take a look at MockServletContext which can be used in unit tests.

提交回复
热议问题