springboot solves the problem of inaccessible static resources
First of all, my directory structure is as follows:
Static resources are placed in the static folder
Then the solution is:
add the following code in application.properties
## 静态资源访问配置
spring.mvc.static-path-pattern=/static/**
/ Is your resources directory, the above code means that all resources in the resources/static directory can be accessed
Before
adding code: After adding code: