Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cnapagoda/spring4-struts2-hibernate4
Spring4, Struts2 and Hibernate4 based sample web project
https://github.com/cnapagoda/spring4-struts2-hibernate4
Last synced: 9 days ago
JSON representation
Spring4, Struts2 and Hibernate4 based sample web project
- Host: GitHub
- URL: https://github.com/cnapagoda/spring4-struts2-hibernate4
- Owner: cnapagoda
- License: apache-2.0
- Created: 2017-06-10T15:36:32.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-11T11:41:49.000Z (over 7 years ago)
- Last Synced: 2024-11-08T14:59:43.065Z (2 months ago)
- Language: Java
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring4-Struts2-Hibernate4
Spring4, Struts2 and Hibernate4 based sample web projectIn this sample project , I have integrated Structs2 and Spring 4 with Hibernate 4 using annotation based configuration. This project includes a simple CRUD java application, creating hibernate entities, saving data in MySQL database , performing database CRUD operations within transaction using annotation based configuration.
How to Run this project
- Create a database called `chandana`
- Compile the project using maven:
```sh
$ mvn clean install
```
- Run using jetty plugin
```sh
$ mvn jetty:run
```
- Access the `http://localhost:8080/Spring4/`### Struts 2 - Interceptors
Struts2 Interceptors are responsible for most of the processing inside the Struts2 framework. You can register an interceptor in Action class level or make it default for all the actions.
@InterceptorRef(value="customStack")
or
### Struts 2 - different ways to create Action classes
- Implementing Action interface
- Using Struts2 @Action annotation
- Extending ActionSupport class(Ex: LoginAction - I used this option. There you can override methods validate and execute methods.)### Structs2 - Validation support.
The Struts validation framework provides inbuilt validation support. In this sample I have implemented required string validation. So please refer LoginAction class.