Mybatis+SpringMVC+Maven配置问题
- 格式:docx
- 大小:44.74 KB
- 文档页数:10
Mybatis+SpringMVC+Maven配置问题 Web.xml配置 xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
这里配置springmvc文件(目录如:) springmvc_mybitas contextConfigLocation classpath*:spring_xml/applicationContext*.xml
org.springframework.web.context.ContextLoaderListenerclass> springmvc
org.springframework.web.servlet.DispatcherServlet contextConfigLocation
WEB-INF/classes/spring_xml/springmvc-servlet.xml 0 springmvc *.do initServlet com.echosoft.common.servlet.InitServlet 1 同步在线设备检测数据 SyncDataServlet SyncDataServlet com.echosoft.bcda.servlet.SyncDataServlet path config/device_config.properties 2 SyncDataServlet /SyncDataServlet encodingFilter org.springframework.web.filter.CharacterEncodingFilter encoding UTF-8 encodingFilter *.do 下面的配置是加载所有js,css和所有图片的格式 default *.css default *.gif default *.jpg default *.js default *.png admin/admin_login.jsp index.html
application_Context.xml配置 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
class="org.springframework.jdbc.datasource.DriverManagerDataSource"> ${driverClassName} ${password} ${username} ${url}