- 浏览: 14942 次
- 性别:
- 来自: 深圳
最新评论
pom.xml:
[html] view plaincopy
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>springibatis</groupId>
<artifactId>springibatis</artifactId>
<packaging>war</packaging>
<version>1.0.0-SNAPSHOT</version>
<name>springibatis Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<spring.version>3.1.1.RELEASE</spring.version>
<slf4j.version>1.6.4</slf4j.version>
<log4j.version>1.2.16</log4j.version>
</properties>
<dependencies>
<!-- test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<!-- spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-asm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- validate -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.1.0.Final</version>
</dependency>
<!-- loggin -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- mysql -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.10</version>
</dependency>
<!-- apache -->
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
<!-- json -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.1.28</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.12</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.12</version>
</dependency>
<!-- ibatis -->
<dependency>
<groupId>org.apache.ibatis</groupId>
<artifactId>ibatis-sqlmap</artifactId>
<version>2.3.4.726</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.2.2</version>
</dependency>
</dependencies>
<build>
<finalName>springibatis</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<skip>true</skip>
</configuration>
</plugin>
<!-- tomcat plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<url>http://localhost:8080/manager</url>
<server>springibatis</server>
<path>/</path>
<port>80</port>
</configuration>
</plugin>
</plugins>
</build>
</project>
[html] view plaincopy
web.xml:
[html] view plaincopy
<?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" 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_3_0.xsd" version="3.0">
<display-name>springibatis</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/springmvc-servlet.xml,
classpath:applicationContext.xml
</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
springmvc-servlet.xml:
[html] view plaincopy
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
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/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<!-- 自动扫描,完成bean创建和依赖注入 -->
<context:component-scan base-package="com.springibatis"/>
<mvc:annotation-driven/>
<!-- 启动Spring MVC的注解功能,完成请求和注解POJO的映射 -->
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
</beans>
applicationContext.xml:
[html] view plaincopy
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.1.xsd">
<context:component-scan base-package="com.springibatis"/>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>
<!-- jdbc -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/user" />
<property name="username" value="root" />
<property name="password" value="admin" />
</bean>
<!-- ibatis -->
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation" value="classpath:sqlMapConfig.xml" />
<property name="dataSource" ref="dataSource" />
</bean>
</beans>
sqlMapConfig.xml:
[html] view plaincopy
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<settings cacheModelsEnabled="true" enhancementEnabled="true"
lazyLoadingEnabled="true" errorTracingEnabled="true" useStatementNamespaces="true" />
<sqlMap resource="META-INF/UserDao.xml"/>
</sqlMapConfig>
[html] view plaincopy
UserDaoMap.xml:
[html] view plaincopy
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-2.dtd" >
<sqlMap namespace="UserDao">
<select id="getUserById" resultClass="com.springibatis.pojo.User">
select * from user where userId = #userId#
</select>
<insert id="addUser" parameterClass="com.springibatis.pojo.User">
insert into user
(userName, password, userTel)
values
(#userName#, #password#, #userTel#)
<selectKey resultClass="String" keyProperty="userId">
select LAST_INSERT_ID() as userId
</selectKey>
</insert>
<update id="updateUser" parameterClass="com.springibatis.pojo.User">
update user
set password = #password#, userTel = #userTel#
where userId = #userId#
</update>
<delete id="deleteUser">
delete from user where userId = #userId#
</delete>
</sqlMap>
[html] view plaincopy
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>springibatis</groupId>
<artifactId>springibatis</artifactId>
<packaging>war</packaging>
<version>1.0.0-SNAPSHOT</version>
<name>springibatis Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<spring.version>3.1.1.RELEASE</spring.version>
<slf4j.version>1.6.4</slf4j.version>
<log4j.version>1.2.16</log4j.version>
</properties>
<dependencies>
<!-- test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<!-- spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-asm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- validate -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.1.0.Final</version>
</dependency>
<!-- loggin -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- mysql -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.10</version>
</dependency>
<!-- apache -->
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
<!-- json -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.1.28</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.12</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.12</version>
</dependency>
<!-- ibatis -->
<dependency>
<groupId>org.apache.ibatis</groupId>
<artifactId>ibatis-sqlmap</artifactId>
<version>2.3.4.726</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.2.2</version>
</dependency>
</dependencies>
<build>
<finalName>springibatis</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<skip>true</skip>
</configuration>
</plugin>
<!-- tomcat plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<url>http://localhost:8080/manager</url>
<server>springibatis</server>
<path>/</path>
<port>80</port>
</configuration>
</plugin>
</plugins>
</build>
</project>
[html] view plaincopy
web.xml:
[html] view plaincopy
<?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" 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_3_0.xsd" version="3.0">
<display-name>springibatis</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/springmvc-servlet.xml,
classpath:applicationContext.xml
</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
springmvc-servlet.xml:
[html] view plaincopy
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
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/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<!-- 自动扫描,完成bean创建和依赖注入 -->
<context:component-scan base-package="com.springibatis"/>
<mvc:annotation-driven/>
<!-- 启动Spring MVC的注解功能,完成请求和注解POJO的映射 -->
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
</beans>
applicationContext.xml:
[html] view plaincopy
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.1.xsd">
<context:component-scan base-package="com.springibatis"/>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>
<!-- jdbc -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/user" />
<property name="username" value="root" />
<property name="password" value="admin" />
</bean>
<!-- ibatis -->
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation" value="classpath:sqlMapConfig.xml" />
<property name="dataSource" ref="dataSource" />
</bean>
</beans>
sqlMapConfig.xml:
[html] view plaincopy
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<settings cacheModelsEnabled="true" enhancementEnabled="true"
lazyLoadingEnabled="true" errorTracingEnabled="true" useStatementNamespaces="true" />
<sqlMap resource="META-INF/UserDao.xml"/>
</sqlMapConfig>
[html] view plaincopy
UserDaoMap.xml:
[html] view plaincopy
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-2.dtd" >
<sqlMap namespace="UserDao">
<select id="getUserById" resultClass="com.springibatis.pojo.User">
select * from user where userId = #userId#
</select>
<insert id="addUser" parameterClass="com.springibatis.pojo.User">
insert into user
(userName, password, userTel)
values
(#userName#, #password#, #userTel#)
<selectKey resultClass="String" keyProperty="userId">
select LAST_INSERT_ID() as userId
</selectKey>
</insert>
<update id="updateUser" parameterClass="com.springibatis.pojo.User">
update user
set password = #password#, userTel = #userTel#
where userId = #userId#
</update>
<delete id="deleteUser">
delete from user where userId = #userId#
</delete>
</sqlMap>
发表评论
-
异步导入
2018-11-11 16:52 964在网上找了很多资料,导入五花八门。由于我参与到导入功能是从架构 ... -
可伸缩性框架搭建
2015-10-28 16:55 510本文面向创业公司的工 ... -
响应结果码 枚举类
2015-10-23 13:59 1638package com.gxhl.ism.common.uti ... -
配置Log4j(很详细)
2015-10-19 00:06 398Log4J的配置文件(Configuration File)就 ... -
CXF与AXIS2 总结
2015-09-30 12:22 1843CXF与AXIS2比较 这两个产品都是Apache孵化器 ... -
从FTP服务器下载文件解压读写
2015-09-25 14:28 2551package junit; import java.io. ... -
面试汇总 很常见
2015-09-24 10:43 551一、String,StringBuffer, Stri ... -
Java注解教程:自定义注解示例,利用反射进行解析
2015-09-23 17:28 374va注解能够提供代码的相关信息,同时对于所注解的代码结构又没有 ... -
更好的设计你的 REST API(智能家园转载)
2015-09-21 15:10 325REST API 设计在细节上有很多自己独特的需要注意的技巧, ... -
J2EE设计模式-Intercepting Filter
2015-09-21 14:43 480ntercepting Filter类似于职责链模式 有两种 ... -
自己动手实现Java Validation 和JSR 303
2015-09-21 14:32 1633参数检查用得最多的是JSR 303,用法示例: http:/ ...
相关推荐
在IT行业中,构建高效、可扩展的Web应用是至关重要的,而"Maven搭建SpringMVC+Spring+Ibatis"的组合则提供了一种强大的解决方案。本文将深入探讨这些技术及其集成,帮助你理解和掌握如何利用它们来构建现代化的Java ...
在构建企业级Web应用时,"maven+springmvc+spring+ibatis+velocity+mysql"这个组合提供了高效且灵活的开发框架。让我们逐一解析这些技术及其在项目中的作用。 **Maven** 是一个项目管理和综合工具,它帮助开发者...
整合 Spring MVC、Spring 和 iBATIS,首先需要在项目中引入相应的库,例如通过 Maven 或 Gradle 管理依赖。然后,配置 Spring 的 XML 配置文件,定义数据源(DataSource)、SqlSessionFactory 和 SqlSessionTemplate...
由于最近需要用到IntelliJ IDEA 来写ssm项目,而之前自己用的一直是eclipse,网上找了很多都没有找到相关资源,有教程但是自己跟着搭建发现运行不了。所以自己就抽时间搭建了一下,并且测试了多次没有问题。...
【标题】"Maven+Dubbo+SpringBoot+SpringMvc+Ibatis支持JSP"的项目集成详解 在现代Web开发中,各种框架和技术的整合是常见的需求,以提高开发效率和系统的可维护性。本项目结合了Maven、Dubbo、SpringBoot、...
在本文中,我们将详细探讨如何使用注解方式搭建一个基于Spring MVC、Spring和iBatis的Web应用程序。这个框架组合被广泛用于构建企业级的Java应用,因为它提供了强大的依赖注入、AOP(面向切面编程)以及数据库操作...
本项目是一个完整的Spring MVC 3、Spring 3 和 iBATIS 集成示例,可以直接运行,帮助开发者快速理解和实践这三者之间的协作。 Spring MVC 是 Spring 框架的一部分,它作为一个轻量级的MVC(Model-View-Controller)...
SSM框架,即Spring、SpringMVC和MyBatis的集成,是Java开发中常见的Web应用程序框架组合。这个框架集合提供了完整的后端解决方案,涵盖了依赖注入(DI)、面向切面编程(AOP)、模型视图控制器(MVC)以及持久层操作...
SSM框架,即SpringMVC、Spring和Mybatis的集成,是Java开发中常见的Web应用程序框架组合。这个项目是基于Maven构建的,用于实现基本的CRUD(创建、读取、更新、删除)操作。下面我们将深入探讨这三个组件以及它们...
通过以上步骤,我们可以构建一个基于Maven、Spring、SpringMVC和iBatis的Java Web应用,这种架构模式在实际开发中广泛应用,具有良好的可扩展性和维护性。理解并掌握这些技术的整合,对于提升开发效率和代码质量具有...
本实例" Maven2项目集成springmvc, spring3, ibatis和freemarker"提供了一个完整的解决方案,旨在帮助开发者快速搭建基于这些技术的Web应用程序。以下是这些技术的详细说明和集成过程。 **Maven2**: Maven是一款...
【标题】"maven+velocity+springmvc+ibatis+mysql"是一个综合性的Web项目构建方案,它结合了多个开源技术来创建一个用户管理系统。在这个系统中,Maven作为项目管理和构建工具,Velocity用于模板引擎生成动态网页,...
【SpringMVC+Ibatis+MySQL Demo】是一个适合初学者的综合项目,它结合了三个核心技术,用于构建基于Java的Web应用程序。这个Demo展示了如何利用SpringMVC作为控制层,Ibatis作为数据访问层,以及MySQL数据库来实现...
在Java Web开发中,Spring、SpringMVC和MyBatis是一个常见的组合,被称为SSM框架。这个框架集合提供了强大的服务层、控制层和数据访问层的解决方案。在现代Web应用中,经常需要与前端交互,返回JSON数据进行数据传输...
本项目“springmvc+ibatis+maven多项目整合”正是这样一种实践,它结合了Spring MVC作为Web层框架、iBatis作为数据访问层(DAO)框架以及Maven作为项目构建和依赖管理工具,旨在提供一个可扩展、易维护的开发结构。...
标题 "ssi:springmvc + spring + ibatis" 暗示了这是一个关于使用Spring MVC、Spring框架和iBatis(现为MyBatis)构建Java Web应用的项目。这三个技术是Java开发中非常重要的组件,它们共同作用于构建高效、灵活的...
这里,我们有一个名为"ibatisDemo"的压缩包,其中包含了基于Maven构建的SpringMVC+iBatis项目实例和源代码。 **SpringMVC框架** 是Spring框架的一部分,专门用于处理Web应用的请求和响应。它提供了模型-视图-控制器...
1. 添加相关依赖:在maven的pom.xml文件中,需要添加SpringMVC、iBatis以及相关的数据库驱动依赖。 2. 配置SpringMVC:创建springmvc-servlet.xml文件,配置DispatcherServlet、视图解析器、拦截器等。 3. 配置...
### SSM三大框架整合详细总结(Spring+SpringMVC+MyBatis) #### 一、基础知识概述 **Spring** - **定义与起源**:Spring框架是一个开源的轻量级Java开发框架,它最初由Rod Johnson在2003年创建。Spring框架的主要...
- **依赖注入(DI)**:SpringMVC 基于 Spring 容器,可以实现组件间的依赖注入,降低了组件之间的耦合度。 - **拦截器(Interceptor)**:SpringMVC 提供了拦截器机制,用于在请求处理前后执行自定义逻辑,如权限...