前言
最近在做一个小项目,基于Maven构建,框架使用现在主流的:SpringMVC(4.1)+Spring(4.1)+MyBatis(3.4.0),实现基本增删改查,页面国际化。数据源采用阿里开源的Druid,前端采用基于Bootstrap封装的模板AdminLTE(2.3.6)及Bootstrap的一些插件。MyBaits采用了另外一位博友提供的通用CRUD代码。
前段时间发过几篇文档,陆续有些朋友需要源码,今天有时间,将项目简化,源码发出。仅供学习!
文章地址:
http://blog.csdn.net/cyh1111/article/details/52961250
http://blog.csdn.net/cyh1111/article/details/52960233
效果
1、登陆
2、注册
3、主页
4、Modal 框 修改
5、操作消息提醒–2秒自动关闭
功能
1、Maven POM文件
<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>com.cyh</groupId>
<artifactId>SSM-Demo</artifactId>
<packaging>war</packaging>
<version>1.0.0.0</version>
<name>SSM-Demo</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- libs -->
<junit.version>4.11</junit.version>
<jstl.version>1.2</jstl.version>
<javaee-api.version>7.0</javaee-api.version>
<cglib.version>3.2.2</cglib.version>
<aspectjrt.version>1.8.0</aspectjrt.version>
<aspectjweaver.version>1.8.0</aspectjweaver.version>
<spring.version>4.1.7.RELEASE</spring.version>
<mybatis-spring.version>1.3.0</mybatis-spring.version>
<mybatis.version>3.4.0</mybatis.version>
<log4j.version>1.2.17</log4j.version>
<slf4j.version>1.7.21</slf4j.version>
<fileupload.version>1.3.1</fileupload.version>
<mysql.version>5.1.35</mysql.version>
<druid.version>1.0.19</druid.version>
<fastjson.version>1.2.11</fastjson.version>
<gson.version>2.3.1</gson.version>
<!--
<commons-lang.version>2.6</commons-lang.version>
<commons-io.version>2.5</commons-io.version>
<jdom.version>2.0.2</jdom.version>
<activeMQ.version>5.11.4</activeMQ.version>
<javassist.version>3.12.1.GA</javassist.version>
<transaction.version>1.1</transaction.version>
-->
</properties>
<!-- 依赖包集合 -->
<dependencies>
<!-- 1. junit 依赖 begin junit3.0使用编程方式运行,junit4.0使用注解方式运行 -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
<!-- junit 依赖 end -->
<!-- 2. Servlet web相关依赖 begin-->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>${javaee-api.version}</version>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>${jstl.version}</version>
</dependency>
<!-- Servlet web相关依赖 end-->
<!-- 3. aspectjweaver 依赖 begin -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectjweaver.version}</version>
</dependency>
<!-- aspectjweaver 依赖 end -->
<!-- 4. spring依赖 begin-->
<!-- spring核心依赖-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- spring ioc依赖 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- spring aop依赖 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>