简体   繁体   English

SpringMVC:“找不到声明要去”

[英]SpringMVC:“Cannot find declaration to go to”

I can't understand why does it give an error.Please,help me!! 我不明白为什么会报错。请帮帮我! 在此处输入图片说明

Spring isn't aware of your custom ViewResolver. Spring不知道您的自定义ViewResolver。 You should denote it with @Bean annotation 您应该使用@Bean注释来表示它

You've got 你有

WEB-INF/view WEB-INF /查看

in your folder structure and 在您的文件夹结构中

WEB-INF/views WEB-INF /观看次数

in your ViewResolver (which does need the @Bean annotation as Nikolay stated) which is why you are receiving a 404. 在ViewResolver中(确实需要尼古拉所说的@Bean注释),这就是为什么您收到404的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM