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

Appearance settings

mdhtr/java-webapplication

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JAVA WEBAPPLICATION BASE

An example setup to kickstart building a java webapplication, with a bunch of configuration examples

EXAMPLES

Configuration

  • How to configure an Embedded Jetty Server with RestEasy and Jackson to serve static frontend files and also REST endpoints
  • How to connect to a H2 in-memory database
  • How to serve static content from resources folder for development
  • How to configure logging with Logback and Slf4j

REST API

  • How to do basic REST endpoints
  • How to process form data in an endpoint
  • How to process json data in an endpoint
  • How to map exceptions to the desired responses
  • How to validate a JSON parsed object during initialization

Testing

  • How to do basic unit testing with Junit5
  • How to do basic REST API integration testing with RestAssured
  • How to do basic End-to-End testing with Selenium

DEVELOPMENT OPTIONS

Frontend

When developing the frontend, it comes in handy if the application can use the files directly from their source without installing them to the target folder.

To enable this, run the application with the static-content-source-folder option and provide the full path to the frontend files location.

For example: -Dstatic-content-source-folder="/full/path/to/java-webapplication/src/main/resources/mdhtr/webapplication/public"

About

Building a java web application step by step

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.