I have seen a lot of projects with tech stack using spring boot and next will separate the frontend and backend into 2 projects or environments. But in here my client wants to put the next js inside the spring boot project, so I am not really sure how to achieve the goals
I have a next.js project, and export the out folder using
npm run build
and it will generate an out directory includes a list of html, js and css files with some routing using the folder name
then I have placed the files inside the out folder into spring boot project /resources/static/
also I am using maven to compile/ build to war file, and this war file will be put into wildfly service
when I compile and deploy into the wildfly service, when I visit:
localhost:8080/rvd-webportal-0.0.1-SNAPSHOT/
it shows nothing, and when I check the network tab, it shows these errors, I think it should be related to the exported files, but I am not really sure how to debug this
I have found the errors are just the same when I open the index.html directly on the browser.
Can anyone help me please? Thanks!!!