项目截图:
数据库脚本:
CREATE DATABASE `company` default charset=utf8;
CREATE TABLE `employer` (
`id` int(20) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL,
`address` varchar(50) NOT NULL,
`create_date` date NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
配置文件:
pom.xml
4.0.0
dyl
ssh
0.0.1-SNAPSHOT
http://maven.apache.org
java
java official repository
http://download.java.net/maven/2/
com.sun
tools
1.5.0
org.apache.struts
struts2-core
2.1.8
org.apache.struts
struts2-spring-plugin
2.1.8
mysql
mysql-connector-java
5.1.9
org.springframework
spring
2.5.6
org.springframework
spring-web
2.5.6
org.hibernate
hibernate
3.2.7.ga
dom4j
dom4j
1.6.1
commons-logging
commons-logging
1.1.1
commons-collections
commons-collections
3.2.1
cglib
cglib
2.1
antlr
antlr
2.7.7
javassist
javassist
3.12.0.GA
web.xml
index.html
structs-tags
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
structs-tags
/*
org.springframework.web.context.ContextLoaderListener
contextConfigLocation
/WEB-INF/classes/SpringBeans.xml
struts.xml
/p>
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
class="employerAction" method="addEmployer" >
/WEB-INF/views/Employer.jsp
class="employerAction" method="listCustomer" >
/WEB-INF/views/Employer.jsp
springBeans.xml
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
运行截图: