Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MVC Rest server in JAVA, using JERSEY and JAX-RS, persistence implemented in JPA

License

NotificationsYou must be signed in to change notification settings

NunuM/rest-server-java-skeleton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

Important Aspects

  • 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

Run

  • Withmaven, build the project with the following command:
 mvn package
  • Finnaly, torun the application:
java -jar target/app/app.jar

Example

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.

Swagger:

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp