1.Example Frontend Repository
Example Frontend Repository
The following is a visualization tool of all commands, events and policies in a backend system:

2.How does it work in Spring Boot
How does it work in Spring Boot
2.1.How Spring Boot serves the React Endpoint
How Spring Boot serves the React Endpoint
-
The react application is built into an
index.htmlwith several bundled files:
These built files are relocated into
src/main/resources/static/in a spring boot project
-
If our spring boot application can be accessed via the domain name
some-domain.com, our react application will be available precisely atsome-domain.com
2.2.Routes for Data Fetching from the Same Origin
Routes for Data Fetching from the Same Origin
-
For the react app, in this line of App.tsx we fetch data from
/api/commands/flow(hard-coded) and feed that data into our visualization component.This
/api/commands/flowinside the react application will be resolved intosome-domain.com/api/commands/flow -
This is exactly how our react application is deployed and how it fetches data from the same origin:









