springmvc-router没有选择routes.conf文件

时间:2015-05-29 06:42:14

标签: java spring spring-mvc

org.springframework.beans.factory.BeanCreationException: 
Error creating bean wit h name 'handlerMapping' defined in ServletContext   
resource [/WEB-INF/axpense-servlet.xml]: Initialization of bean failed;

nested exception is org.resthub.web.springmvc.router.exceptions.RouteFileParsingException:
Could not read route configuration files; 

nested exception is java.io.FileNotFoundException: 
Could not open ServletContext resource [/routes.conf] at 
org.springframework.beans.factory.support.AbstractAutowireCapableBean

我完成了本教程http://resthub.github.io/springmvc-router/

1 个答案:

答案 0 :(得分:0)

将行routeFiles.add("routes.conf");替换为routeFile.add(classpath:/routes.conf);