首页 新闻 赞助 找找看

spring MVC 报错

0
悬赏园豆:10 [已解决问题] 解决于 2019-11-11 17:20

HTTP Status 500 - Request processing failed; nested exception is org.springframework.context.ApplicationContextException: Must define a single FreeMarkerConfig bean in this web application context (may be inherited): FreeMarkerConfigurer is the usual implementation. This bean may be given any name.; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [org.springframework.web.servlet.view.freemarker.FreeMarkerConfig] is defined: expected single bean but found 0

web_兵兵的主页 web_兵兵 | 初学一级 | 园豆:172
提问于:2019-07-31 11:44
< >
分享
最佳答案
0

你这500,就是服务器报错了,你打个断点,进到方法中,看看哪里的问题
Must define a single FreeMarkerConfig bean in this web application context (may be inherited)
这句英文的意思是你必须在上下文中定义这个bean,你应该使用到了freeMaker模板,这个模板在spring初始化的时候,创建s失败,具体的,你再看看吧

收获园豆:10
xujunxing | 菜鸟二级 |园豆:206 | 2019-07-31 17:16
其他回答(2)
0

创建单例bean失败,在容器中找不到bean的id,可能你的名字出错了,根据你的提示只能这样猜测

ITyun | 园豆:204 (菜鸟二级) | 2019-07-31 17:30
0

感谢两位的回答,是由于后台重写方法,参数不同导致的。

web_兵兵 | 园豆:172 (初学一级) | 2019-08-01 08:45
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册