url-pattern:表示哪些请求交给Spring Web MVC处理, “/” 是用来定义默认servlet映射的。也可以如“*.html”表示拦截所有以html为扩展名的请求。
该DispatcherServlet默认使用WebApplicationContext作为上下文,Spring默认配置文件为“/WEB-INF/[servlet名字]-servlet.xml”。
断掉 bean init 就行了
即所对应的bean 并不是直接注入, 而是在调用的时候在 init
new ApplicationContext().getBean(beanID);
你这边可以配置成