Key points here is:
-
add
org.springframework.boot:spring-boot-starter-thymeleaf
dependency inbuild.gradle
-
point templates configuration
spring.thymeleaf.prefix=classpath:/public/
to public folder insrc/main/resources/application.properties
-
during SPA build copy result
index.html
assrc/main/resources/public/error/4xx.html
andsrc/main/resources/public/error/5xx.html
to handle errors with frontend app -
in vue.js frontend app configure error layout in
frontend/layouts/error.vue
links:
other links to read: