Skip to content

A minimalist REST and WebSocket server example using Jetty and Jersey

License

Notifications You must be signed in to change notification settings

akomii/minimal-webserver-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minimal-webserver-example Java 17 Jakarta EE9 Spring Boot 3.0.5

This project is a Spring Boot application that provides a web server with REST and WebSocket endpoints, configured with Jersey and Jetty respectively, and uses dependency injection to manage a shared component across the application.

Modules

  • Parent: Contains configuration and version variables.
  • Server: Implements a server with basic REST endpoints and WebSocket using Jakarta API.
  • Spring: Spring Boot wrapper for the server module. It allows deploying the application to a pre-configured server using mvn spring-boot:run.

Deployment

Prerequisites

  1. Java Development Kit (JDK) 17 - Download and install the JDK.
  2. Apache Maven - Download and install the Maven build tool.

Deployment Steps

  1. Download the project: Obtain the project folder. This folder should contain the pom.xml file and the project's source code.

  2. Open the terminal/command prompt: Navigate to the project folder minimal-webserver-example using the terminal (Mac/Linux) or command prompt (Windows).

  3. Build the project: Run the following command to build and package the project: mvn clean package. This command will download the required dependencies, compile the project, and package it into an executable JAR file. The final JAR file will be located in the directory spring/target, and its name will be spring-1.0-SNAPSHOT.jar.

  4. Run the application: Execute the following command: java -jar spring/target/spring-1.0-SNAPSHOT.jar. This will start the Spring Boot application, and it will be accessible locally.

  5. Access the application: You can now access the application's REST endpoints and WebSocket using your preferred tools or web browser, connecting to http://localhost:8080/....

About

A minimalist REST and WebSocket server example using Jetty and Jersey

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages