Spring+SpringMVC+Mybatis+Maven+MySql框架搭建与分页实例
1. 工程运行环境
JDK:1.6
TOMCAT7
Windows7/Eclipse luna
对应博文:http://blog.csdn.net/evankaka/article/details/49452201
2. 后台使用到的框架
Spring+SpringMVC+Mybatis+Maven
日志使用:logback
数据库使用:Mysql
后台分页使用:PageHelp(与Mybatis一起使用)
3. 前台使用
框架:Bootstarp+JSP
4. 数据源配置
数据库配置修改
请修改POM.XML中的profiles里的内容,将jdbcurl、jdbcusername、jdbc_password修改成自己的,示例如下:
<jdbc_driverClassName>com.mysql.jdbc.Driver</jdbc_driverClassName>
<jdbc_url>jdbc:mysql://localhost:3306/learning</jdbc_url>
<jdbc_username>root</jdbc_username>
<jdbc_password>christmas</jdbc_password>
5. 建表语句
CREATE DATABASE learning;
USE learning;
CREATE TABLE t_user (
USER_ID int(11) NOT NULL AUTOINCREMENT,
USER_NAME char(30) NOT NULL,
USER_PASSWORD char(10) NOT NULL,
USER_EMAIL char(30) NOT NULL,
PRIMARY KEY (USER_ID),
KEY IDX_NAME (USER_NAME)
) ENGINE=InnoDB AUTOINCREMENT=47 DEFAULT CHARSET=utf8
6. 数据插入
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (1, '林炳文', '1234567@', 'ling20081005@126.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (2, 'evan', '123', 'fff@126.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (3, 'kaka', 'cadg', 'fwsfg@126.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (4, 'simle', 'cscs', 'fsaf@126.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (5, 'arthur', 'csas', 'fsaff@126.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (6, '小德', 'yuh78', 'fdfas@126.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (7, '小小', 'cvff', 'fsaf@126.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (8, '林林之家', 'gvv', 'lin@126.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (9, '林炳文Evankaka', 'dfsc', 'ling2008@126.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (10, 'apple', 'uih6', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (11, 'apple', 'tgggg', '43qt@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (12, 'apple', 'ggg', '14e23@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (13, 'apple', 'gg', '122@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (14, 'apple', 'dsv', '34r@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (15, 'apple', 'vvfdz', '456@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (16, 'apple', 'vz', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (17, 'apple', 'zvz', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (18, 'apple', 'dvs', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (19, 'apple', 'czvcx', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (20, 'apple', 'xvzczv', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (21, 'apple', 'cz', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (22, 'apple', 'cxz', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (23, 'apple', 'czv', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (24, 'apple', 'C', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (25, 'apple', 'dfdsf', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (26, 'apple', 'vvf', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (27, 'apple', '45', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (28, 'apple', '5677', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (29, 'apple', '8', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (30, 'apple', '8', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (31, 'apple', '0h', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (32, 'apple', 'vf', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (33, 'apple', 'sfd', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (34, 'apple', '5yh', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (35, 'apple', 'bdf', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (36, 'apple', 'gers', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (37, 'apple', '89', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (38, 'apple', '5t', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (39, 'apple', 'gse', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (40, 'apple', 'gs', 'ff@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (41, 'apple', 'bs', '4454@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (42, 'apple', 'fs', '3445@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (43, 'apple', 'bs', '354@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (44, 'apple', 'fsd', '567@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (45, 'apple', 'sd', '45567@qq.com');
INSERT INTO tuser (USERID, USERNAME, USERPASSWORD, USEREMAIL) VALUES (46, 'apple', 'gs', '456@qq.com');
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
ssm_project.rar (71个子文件)
ssm_project
.project 1KB
打开说明.txt 6KB
src
test
resources
main
webapp
WEB-INF
view
bootstrap
update.jsp 2KB
bootstrapTest1.jsp 7KB
insert.jsp 2KB
web.xml 3KB
static
js
bootstrap
js
bootstrap-paginator.min.js 9KB
bootstrap.min.js 36KB
fonts
glyphicons-halflings-regular.ttf 44KB
glyphicons-halflings-regular.woff2 18KB
glyphicons-halflings-regular.eot 20KB
glyphicons-halflings-regular.svg 106KB
glyphicons-halflings-regular.woff 23KB
css
bootstrap.min.css 117KB
jQuery
jquery-2.1.4.min.js 82KB
META-INF
MANIFEST.MF 36B
resources
properties
jdbc.properties 169B
application.xml 3KB
springmvc
spring-mvc.xml 5KB
mybatis
mybatis-config.xml 2KB
logback.xml 6KB
java
com
lin
common
HttpConstants.java 887B
service
UserServiceImpl.java 1KB
UserService.java 1013B
domain
User.java 2KB
dto
BaseEntity.java 3KB
controller
BaseController.java 4KB
UserController.java 8KB
mapper
UserMapper.xml 2KB
json
JsonDateValueProcessor.java 2KB
dao
UserDao.java 888B
util
PagedResult.java 1KB
BeanUtil.java 895B
target
m2e-wtp
web-resources
META-INF
MANIFEST.MF 107B
maven
com.lin
ssm_project
pom.properties 224B
pom.xml 7KB
classes
properties
jdbc.properties 169B
application.xml 3KB
com
lin
common
HttpConstants.class 871B
service
UserService.class 700B
UserServiceImpl.class 2KB
domain
User.class 3KB
dto
BaseEntity$PropertyInfo.class 468B
BaseEntity.class 4KB
controller
UserController.class 8KB
BaseController.class 3KB
mapper
UserMapper.xml 2KB
json
JsonDateValueProcessor.class 2KB
dao
UserDao.class 582B
util
PagedResult.class 2KB
BeanUtil.class 1KB
springmvc
spring-mvc.xml 5KB
mybatis
mybatis-config.xml 2KB
logback.xml 5KB
resources
properties
jdbc.properties 169B
application.xml 3KB
springmvc
spring-mvc.xml 5KB
mybatis
mybatis-config.xml 2KB
logback.xml 5KB
test-classes
.settings
org.eclipse.wst.jsdt.ui.superType.container 49B
org.eclipse.wst.common.project.facet.core.xml 337B
org.eclipse.m2e.core.prefs 86B
org.eclipse.jdt.core.prefs 723B
org.eclipse.wst.validation.prefs 48B
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.wst.common.project.facet.core.prefs.xml 309B
org.eclipse.core.resources.prefs 204B
org.eclipse.wst.common.component 769B
.jsdtscope 562B
pom.xml 7KB
.classpath 2KB
共 71 条
- 1
资源评论
一个海草
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功