spring-boot-react-maven-starter

A multi module Spring Boot React starter for building real-world enterprises apps

Github stars Tracking Chart

spring-boot-react-maven-starter

This is a multi-module Spring Boot React Apache Maven starter app with good defaults. The react app is built using create-react-app.

This project provides productive setup for building Spring Boot React applications. The application is divided into two Maven modules:

  1. backend: This contains Java code of the application.
  2. frontend: This contains all react JavaScript code of the application.

Running the full application

You can build the package as a single artifact by running the ./mvnw clean install.
Next, you can run the application by executing:

$ java -jar backend/target/backend-0.1.0-SNAPSHOT.jar

The application will be accessible at http://localhost:8080.

Features

This starter comes bundled with the following features:

  1. Multi module Maven project: A multi module project to modularize backend and frontend code separately.
  2. Maven wrapper: So, you don't need to install Maven on your machine.
  3. Checkstyle: Enforce sane coding standard guidelines.
  4. ErrorProne: Find errors in your code.
  5. Copy paste detection: Uses PMD CPD check to detect code duplication.
  6. CORS enabled: A global configuration is added to enable CORS so that frontend can work seamlessly with backend during development.
  7. REST API base path: Sets the base REST API path to /api. You can configure it by changing rest.api.base.path property.
  8. Bundle Git commit information

Running the backend for development mode

There are multiple ways to run the backend. For development, you can use your favorite IDE and run the
com.example.app.Application. As soon as your code compiles, Spring Boot DevTools will reload the code.

You can also run the application using Maven.

$ cd backend
$  ../mvnw spring-boot:run

Running the frontend for development mode

You will need 6.0+ and yarn to run the dev server and build the project.

Make sure to install yarn on your development machine.

To install all the required binaries for your project, you can run following command.

$ cd frontend
$ ../mvnw frontend:install-node-and-yarn frontend:yarn

Once the above command finishes, you can start the frontend using the yarn start command.

Hot reloading

Both the frontend and backend support hot reloading.

Overview

Name With Ownerthephpleague/oauth2-server
Primary LanguagePHP
Program languageHTML (Language Count: 1)
Platform
License:MIT License
Release Count109
Last Release Name9.0.0-RC1 (Posted on )
First Release Name0.1 (Posted on )
Created At2012-06-04 20:00:52
Pushed At2024-05-06 23:18:57
Last Commit At2024-04-14 22:10:33
Stargazers Count6.5k
Watchers Count213
Fork Count1.1k
Commits Count3k
Has Issues Enabled
Issues Count723
Issue Open Count64
Pull Requests Count421
Pull Requests Open Count24
Pull Requests Close Count236
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private
To the top