在配置文件中谨慎使用classpath*: 来加载资源文件

    xiaoxiao2021-03-25  92

    classpath*: 能够加载到jar包中的配置文件,路径错了以后能加载其他的配置文件 ,此时项目启动并不会报错,实际操作时 就报出莫名其妙的错

    下面这个例子就是没加载到实际想加载的配置,导致的报错

    [DispatcherServlet.noHandlerFound(1108)] - No mapping found for HTTP request with URI [/boke/upload/init] in DispatcherServlet with name ‘spring-mvc’

    转载请注明原文地址: https://ju.6miu.com/read-16081.html

    最新回复(0)