freemaker, a static file is generated, and an error 404 occurs when forwarding the file

An error is reported, a static file has been generated, and 404 appears when forwarding the static file, the error is as follows:
[org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]Did not find handler method for [/staticPage/test-simple2testtestHtml_zh_CN.html ]

[org.springframework.web.servlet.PageNotFound]No mapping found for HTTP request with URI [/test-simple2/staticPage/test-simple2testtestHtml_zh_CN.html] in DispatcherServlet with name 'SpringMVC'

Solution: The resource is blocked, so it cannot be accessed

1. Create a static folder in the project, such as: staticPage

2. Add in spring-mvc.xml

       <!-- Resource Filtering-->

    <mvc:resources mapping="/staticPage/**" location="/staticPage/" />

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326400909&siteId=291194637