[英]SpringMVC:“Cannot find declaration to go to”
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.