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
- Host: GitHub
- URL: https://github.com/fzn0x/spring-react-thymeleaf
- Owner: fzn0x
- Created: 2024-02-16T05:37:47.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-16T05:50:41.000Z (about 1 year ago)
- Last Synced: 2024-12-31T06:42:04.616Z (4 months ago)
- Language: HTML
- Size: 239 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 profileThis 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
}