The spring-kitchensink-basic
quickstart is an example of a Java EE 7 application using JSP, JPA and Spring 4.x.
The spring-kitchensink-basic
quickstart is an example of a Java EE 7 application using JSP, JPA and Spring 4.x in WildFly Application Server. It
includes a persistence unit and some sample persistence and transaction code to introduce you to database access in enterprise Java:
-
In the
jboss-as-spring-mvc-context.xml
file, thecontext:component-scan
andmvc:annotation-driven
elements are used to register both the non-rest and rest controllers. -
The controllers map the respective urls to methods using
@RequestMapping(url)
. -
To return JSON, the rest controller uses
@ResponseBody
. -
The datasource and entitymanager are retrieved via JNDI.
The application will be running at the following URL: http://localhost:8080/{artifactId}/.