サーバー上のすべてのリクエストを管理するコントローラーがあります。
@RequestMapping(value = "/**", produces = {"text/plain", "application/*"})
@Controller
public class HomeController {
...
}
また、xml内のリソースのマッピングがあります。
<mvc:resources location="/resources/" mapping="/assets/**"/>
ホームコントローラーは、サーバーへのすべての要求をインターセプトします(/ Assets / **マッピングを含む)。しかし、クライアントがCCSファイルを要求すると、サーバーは406エラーを返します(そしてHomecontrollerメソッドは呼び出されませんでした):
The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers.
Springリソースハンドラーの順序を修正したり、CSSファイルの応答を修正したりして、サーバーから手動で返すことができるようにする機会はありますか?
ありがとう!