- Notifications
You must be signed in to change notification settings - Fork0
MVC Rest server in JAVA, using JERSEY and JAX-RS, persistence implemented in JPA
License
NunuM/rest-server-java-skeleton
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Rest server in JAVA, using JERSEY and JAX-RS, persistence implemented in JPA and also Swagger for auto-generated documentation in a non-servlet environment making this application is an excellent starting point to build your application.
AppSettings class is reponsable to hold your start up settings application.
The persistence is decoupled from the database, you can save your data on every database you want, in AppSettings is declarated the Repository factory that PersistenceContext instantiates in runtime using reflection.
The database in use isH2, which we can use as a volatile database because it has the option to run inmemory, in other words, each application shutdown erases all the data. This can be modified by changing thejdbc database connection string
The Javax Persistence implementation is provided by theeclipse link
- Withmaven, build the project with the following command:
mvn package
- Finnaly, torun the application:
java -jar target/app/app.jar
The application when starts it bootstraps some actors and we can check them by:
curl http://localhost:8080/actor
or opening our browser:http://localhost:8080/actor to see the result.
This starter application alread comes with swagger that can generate automatic documentation on a Java server without having a servlet container.
curl http://localhost:8080/swagger/swagger.json
or in your browser:http://localhost:8080/swagger/swagger.json
Open an issue if you find any problem 👍
About
MVC Rest server in JAVA, using JERSEY and JAX-RS, persistence implemented in JPA
Topics
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.