欢迎您访问365答案网,请分享给你的朋友!
生活常识 学习资料

ssm配置文件

时间:2023-06-13
 jdbc.properties 

jdbc.driver=com.mysql.cj.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/bsssm?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
jdbc.username=root
jdbc.password=1234

applicationContext_dao.xml 

<?xml version="1.0" encoding="UTF-8"?>
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:context="http://www.springframework.org/schema/context"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd">
   
   
   
             init-method="init" destroy-method="close">
       
       
       
       
       

   

   
   
       
       
       
       
       
       
   


   
   
       

       

       
   

applicationContext_service.xml 

<?xml version="1.0" encoding="UTF-8"?>
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
      xmlns:aop="http://www.springframework.org/schema/aop"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop.xsd">



   

   

   

   
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
   



   
   
       
       
   

springmvc.xml 

<?xml version="1.0" encoding="UTF-8"?>
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:mvc="http://www.springframework.org/schema/mvc"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc https://www.springframework.org/schema/mvc/spring-mvc.xsd">

   

   
   
       
       
   


   
   


   
   

SqlMapConfig.xml 

<?xml version="1.0" encoding="UTF-8" ?>
       "http://mybatis.org/dtd/mybatis-3-config.dtd">




   

       

   



   

web.xml 

<?xml version="1.0" encoding="UTF-8"?>
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
        version="4.0">


   encode
   org.springframework.web.filter.CharacterEncodingFilter
   
       encoding
       UTF-8
   

   
       forceRequestEncoding
       true
   

   
       forceResponseEncoding
       true
   


   
       encode
       /*
   

   
   
       springmvc
       org.springframework.web.servlet.DispatcherServlet
           
               contextConfigLocation
               classpath:springmvc.xml
           

        1
   

   
       springmvc
       *.action
   

   
   
       org.springframework.web.context.ContextLoaderListener
   
   
       contextConfigLocation
       classpath:applicationContext_*.xml
   

Copyright © 2016-2020 www.365daan.com All Rights Reserved. 365答案网 版权所有 备案号:

部分内容来自互联网,版权归原作者所有,如有冒犯请联系我们,我们将在三个工作时内妥善处理。