您现在的位置是:首页 > 个人日记个人日记
spring&mybatis-改造为webapp
2019-02-07 13:13:59【个人日记】262人已围观
简介将普通maven工程改造为web工程
改造为webapp
首先将pom.xml加入
<packaging>war</packaging>
其次在web.xml中配置
<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://java.sun.com/xml/ns/javaee"xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"id="WebApp_ID" version="3.0"><!--确定配置文件位置--><context-param><param-name>contextConfigLocation</param-name><param-value>classpath:spring-config.xml</param-value></context-param><!--监听器spring监听器,读取配置文件--><listener><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class></listener></web-app>
Tags: JavaWeb
下一篇: mybatis-09-缓存
相关文章
随机图文
评论区
2025-11-09 06:11:46
站长
没有登录功能是为了方便大家留言,但留言接口现在被恶意攻击,将关闭留言接口,如有疑问,请联系我的QQ 1538933906/同微信
