An open API service indexing awesome lists of open source software.

https://github.com/fzn0x/spring-react-thymeleaf

Example of Spring Boot Integration with React and Thymeleaf
https://github.com/fzn0x/spring-react-thymeleaf

Last synced: 2 months ago
JSON representation

Example of Spring Boot Integration with React and Thymeleaf

Awesome Lists containing this project

README

        

# Spring Boot - Thymeleaf - React.js

`Build: maven`

This project show you how to build a Spring Boot app with React.js running on the same port.

This project goal is to reduce development cost by using the same server for both frontend and backend.

React.js act as view for the view controller.

## Requirements

Before running the project, this is what you need:

1. Setup Java in VSCode
2. Using Thymeleaf to pointing static files
3. Run `./mvnw package` to build frontend files and copy inside `target` folder based on the pom.xml configurations

# Project Routes

## React View

### Home [/]

This URL generated by explicit route mapping for "/" in Spring Controller.

#### Open home page [GET]

+ Response 200 (text/html)
## Profile API
Hard coded profile

This is the first group of resources in this document. It is **recognized** by
the **keyword `Profile API`** and its name is `profiles`.

Any following resource definition is considered to be a part of this group
until another group is defined. It is **customary** to increase header level of
resources (and actions) nested under a resource.

### Profile API [/api/profiles]

#### Retrieve a profile [GET]

+ Response 200 (text/plain)

{
"name": "Hello",
"age": 12
}