Spring MVC request mapping
There is still one issue with the routing, which is on the backend this time. After we do a full installation via mvn install, and then start the application either using mvn spring-boot:run or java -jar target/app-0.0.1-SNAPSHOT.jar, we will see a blank page at http://localhost:8080 and 404 at http://localhost:8080/login.
The reason the root page is blank is because without matched request mapping at the root path, Spring Boot will automatically serve index.html that we copied into the src/main/resources/templates folder. You can open Chrome DevTools to check the requests in the Network tab. You will see the .js files and .css files are loaded. The blank page shows up because vue-router doesn't find any match Vue ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access