webside
A simple web site with SpringMVC + Mybatis + Shiro + Druid + Ehcache frameworks, it is a J2EE project named 'webside', provide HTTP and Hessian interface to clients.
Preparation
- Above JDK1.6 install
- Above Maven 3.0.5, Private repository with Nexus is more better in Company
- Eclipse Java EE IDE with Git and Checkstyle plugins, 'Kepler' version is more better.
- MySQL install (No mandatory requirement, maybe replace with H2 or HSQLDB)
User Guide
- generate a Eclipse project with the following MAVEN script in CMD or SHELL window
mvn eclipse:eclipse
- run project in Tomcat
mvn tomcat:run -Dmaven.test.skip=true
- enter the following URL in browser with username/password(zhang/123) to login
http://localhost:8080/webside/index
For Test
- Unit Test, enter the following command
mvn test
- Integration Test, enter the following command
mvn integration-test
- Sourcecode check, enter the following command, see the results in target/checkstyle-result.xml
mvn checkstyle:checkstyle
Introduction
Here introduces some very important configuration files to integrate SpringMVC、MyBatis、Shiro、Ehcache(such as web.xml, Spring configuration, SpringMVC configuration)
Guide to web.xml
src/main/webapp/WEB-INF/web.xml contains: Spring context configuration, Shiro configuration, Charset encode filter, Durid configuration, Hessian configuration, SpringMVC configuration
Guide to Spring configuration files:
spring-config.xml, spring-dao.xml, spring-common.xml, spring-shiro.xml
Guide to Spring MVC configuration file:
spring-mvc.xml