可以在Web项目配置文件web.xml中做出如下配置:

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:applicationContext.xml</param-value>
<context-param>

<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

 

最后修改于 2020-03-21 12:12:16
如果觉得我的文章对你有用,请随意赞赏
扫一扫支付
上一篇