Return several types of content from a single controller and a single URL inside a Spring MVC application.
- Single controller for several content types
Documentation is always generated for the latest release, kept in the 'master' branch:
Documentation is also generated from the latest snapshot, taken from the 'develop' branch:
The documentation site is actually a Maven site, and its sources are included in the project. If required it can be generated by using the following Maven command:
mvn verify site -P jetty
The verify phase is required, otherwise some of the reports won't be generated.
The application is coded in Java, using Maven to manage the project.
The project has been tested on the following Java versions:
- JDK 8
All other dependencies are handled through Maven, and noted in the included POM file.
Maven profiles are included for setting up an embedded server.
Profile | Server |
---|---|
jetty | Jetty embedded server |
tomcat7 | Tomcat 7 embedded server |
The project can be installed by creating the war file and deploying it into a server.
To run the project locally in an embedded server just use the following Maven command for deploying to Jetty:
mvn jetty:run-war -P jetty
An embedded Tomcat can be used through this other profile:
mvn tomcat7:run-war -P tomcat7
With this the project will be accessible at [http://localhost:8080/serving_content/].
This path is defined in the server.test.path property inside the pom, and can be changed by modifying its value.
The project requires a database and a server for being able to run the integration tests.
Just like running the project, an embedded server with an in-memory database can be used:
mvn verify -P jetty
Any kind of help with the project will be well received, and there are two main ways to give such help:
- Reporting errors and asking for extensions through the issues management
- or forking the repository and extending the project
Issues are managed at the GitHub project issues tracker, where any Github user may report bugs or ask for new features.
If you wish to fork or modify the code, visit the GitHub project page, where the latest versions are always kept. Check the 'master' branch for the latest release, and the 'develop' for the current, and stable, development version.
The project has been released under the MIT License.