静态资源目录

1.在ResourceProperties类下

private static final String[] CLASSPATH_RESOURCE_LOCATIONS = new String[]{"classpath:/META-INF/resources/", 
                "classpath:/resources/", "classpath:/static/", "classpath:/public/"};

这些路径是可以直接访问的

2.使用

对第一个test.html无法直接访问

test.css : http://localhost:8080/css/test.css

index.html : http://localhost:8080/index.html

posted @ 2022-10-24 18:51  lwx_R  阅读(20)  评论(0)    收藏  举报