preface:
Recently, I made a boot project. When I jump to the HTML page through the controller layer, the CSS and JS paths in the page have changed. This problem has been bothered for a long time and has finally been solved. I hereby record it to prevent stepping on the pit again in the future.
1. Problem description
(1) First, the access path of the interface is / Wx / AA / education
(2) Next, let’s look at the project path
(3) Look at the page again, and the path can also be clicked in
(4) During the visit, JS and CSS found an additional layer
2. Problem solution
Before comparison, it will/ Instead/
Instead of searching from the upper level, search from the root directory