Skip to content

hyyan/webforj-rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rest

A webforJ application powered by Spring Boot. This project combines the power of webforJ framework with Spring Boot's comprehensive ecosystem for building enterprise applications.

Prerequisites

  • Java 21 or newer
  • Maven 3.9+

Getting Started

To run the application in development mode:

mvn spring-boot:run

Then open http://localhost:8080 in your browser.

Spring Boot Features

This project leverages Spring Boot's features:

  • Embedded Server: No need to deploy WAR files, runs as a standalone JAR
  • Auto-configuration: Spring Boot automatically configures your application
  • DevTools: Automatic restart when code changes (included by default)
  • Spring Ecosystem: Easy integration with Spring Data, etc.

Hot Reload with DevTools

Spring Boot DevTools is included for automatic application restart:

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-devtools</artifactId>
  <optional>true</optional>
</dependency>

Your application will automatically restart when files on the classpath change.

Running Integration Tests

To run end-to-end and integration tests:

mvn verify

This command runs your integration tests using Spring Boot Test framework. Tests annotated with @SpringBootTest will:

  • Start the full Spring application context
  • Run on a random port to avoid conflicts
  • Execute Playwright browser tests against the running application
  • Automatically shut down after tests complete

Spring Boot Configuration

Configure your application using src/main/resources/application.properties:

# Application name
spring.application.name=rest

# Server configuration
server.port=8080

# Add your custom configurations here

Building for Production

To create an executable JAR:

mvn clean package -Pprod
java -jar target/rest-1.0-SNAPSHOT.jar

Or build and run a Docker image:

# Build the Docker image
mvn spring-boot:build-image

# Run the Docker container
docker run -p 8080:8080 rest:1.0-SNAPSHOT

# Or run with environment variables
docker run -p 8080:8080 -e SPRING_PROFILES_ACTIVE=prod rest:1.0-SNAPSHOT

Learn More

Explore the webforJ ecosystem through our documentation and examples:

Spring Boot Resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published