spring-projects / spring-boot

Spring Boot helps you to create Spring-powered, production-grade applications and services with absolute minimum fuss.
https://spring.io/projects/spring-boot
Apache License 2.0
75.25k stars 40.7k forks source link

Nextjs13 app route as static in spring boot #36490

Closed apexbb closed 1 year ago

apexbb commented 1 year ago

I am using Spring Boot and Nextjs13 , which i out the static html fro nextjs and out it in the reource/static file. the problem is that if i use the link by clicking a link or a tag to a webpage say /page1 , it can go to the page, However, when i type {mydomain}/page1, it comes out with Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback.

i saw a exact problem in stackoverflow - https://stackoverflow.com/questions/70394300/supporting-nextjs-routing-over-spring-boot-app-without-any-proxy

however, after adding the suggested answer, it can solve the problem of the page vs page.html problem , but all my spring controller endpoint was not allow to access .

wilkinsona commented 1 year ago

Thanks for the report. Unfortunately, without some more information about your application, I doubt that we will be able to diagnose the problem. If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.

spring-projects-issues commented 1 year ago

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-projects-issues commented 1 year ago

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.