Home > front end >  SSM framework integrating
SSM framework integrating

Time:12-10

SqlmapConfig. XML (if simply small demo can what all don't, put an empty file, but need to file header)
<? The XML version="1.0" encoding="utf-8"?>
PUBLIC "-//mybatis.org//DTD Config/3.0/EN"
"Http://mybatis.org/dtd/mybatis-3-config.dtd" & gt;



ApplicationContext - dao. XML (this is the database configuration (1) the datasource 2. SqlSessionConfig 3. Mapper scans)
<? The XML version="1.0" encoding="utf-8"?>
XMLNS: context="http://www.springframework.org/schema/context" XMLNS: p="http://www.springframework.org/schema/p"
XMLNS: aop="http://www.springframework.org/schema/aop" XMLNS: tx="http://www.springframework.org/schema/tx"
XMLNS: xsi="http://www.w3.org/2001/XMLSchema-instance"
Xsi: schemaLocation="HTTP://http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd "& gt;












(applicationContext - service. The XML configuration a scanning @ the annotation of service annotations driver)
<? The XML version="1.0" encoding="utf-8"?>
XMLNS: context="http://www.springframework.org/schema/context" XMLNS: p="http://www.springframework.org/schema/p"
XMLNS: aop="http://www.springframework.org/schema/aop" XMLNS: tx="http://www.springframework.org/schema/tx"
XMLNS: xsi="http://www.w3.org/2001/XMLSchema-instance"
Xsi: schemaLocation="HTTP://http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd "& gt;


ApplicationContext - transation. XML (transaction management)
<? The XML version="1.0" encoding="utf-8"?>
XMLNS: context="http://www.springframework.org/schema/context" XMLNS: p="http://www.springframework.org/schema/p"
XMLNS: aop="http://www.springframework.org/schema/aop" XMLNS: tx="http://www.springframework.org/schema/tx"
XMLNS: xsi="http://www.w3.org/2001/XMLSchema-instance"
Xsi: schemaLocation="HTTP://http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd "& gt;



  • Related