Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/seckill/list 404 #18

Closed
immiao opened this issue Nov 30, 2017 · 3 comments
Closed

/seckill/list 404 #18

immiao opened this issue Nov 30, 2017 · 3 comments

Comments

@immiao
Copy link

immiao commented Nov 30, 2017

你好,初学Spring,在IDEA生成war后部署到了Tomcat上,localhost:8080/seckill显示Hello World但/seckill/list 404是为什么呢?

下面是log:

29-Nov-2017 19:50:08.875 INFO [http-nio-8080-exec-15] org.apache.catalina.core.StandardContext.reload Reloading Context with name [/seckill] has started
29-Nov-2017 19:50:08.877 INFO [http-nio-8080-exec-15] org.springframework.web.context.support.XmlWebApplicationContext.doClose Closing WebApplicationContext for namespace 'seckill-dispatcher-servlet': startup date [Wed Nov 29 18:12:49 EST 2017]; root of context hierarchy
29-Nov-2017 19:50:10.090 INFO [http-nio-8080-exec-15] org.apache.catalina.core.StandardContext.reload Reloading Context with name [/seckill] is completed
29-Nov-2017 19:50:27.670 INFO [http-nio-8080-exec-19] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'seckill-dispatcher': initialization started
29-Nov-2017 19:50:27.685 INFO [http-nio-8080-exec-19] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing WebApplicationContext for namespace 'seckill-dispatcher-servlet': startup date [Wed Nov 29 19:50:27 EST 2017]; root of context hierarchy
29-Nov-2017 19:50:27.720 INFO [http-nio-8080-exec-19] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from file [/usr/local/Cellar/tomcat/8.5.23/libexec/webapps/seckill/WEB-INF/classes/spring/spring-service.xml]
29-Nov-2017 19:50:27.824 INFO [http-nio-8080-exec-19] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from file [/usr/local/Cellar/tomcat/8.5.23/libexec/webapps/seckill/WEB-INF/classes/spring/spring-web.xml]
29-Nov-2017 19:50:27.885 INFO [http-nio-8080-exec-19] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from file [/usr/local/Cellar/tomcat/8.5.23/libexec/webapps/seckill/WEB-INF/classes/spring/spring-dao.xml]
29-Nov-2017 19:50:28.016 INFO [http-nio-8080-exec-19] org.springframework.context.support.PropertySourcesPlaceholderConfigurer.loadProperties Loading properties file from class path resource [jdbc.properties]
19:50:28.155 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.logging.LogFactory - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter.
29-Nov-2017 19:50:28.185 INFO [http-nio-8080-exec-19] com.mchange.v2.log.MLog.<clinit> MLog clients using java 1.4+ standard logging.
29-Nov-2017 19:50:28.216 INFO [http-nio-8080-exec-19] com.mchange.v2.c3p0.C3P0Registry.banner Initializing c3p0-0.9.1.1 [built 15-March-2007 01:32:31; debug? true; trace: 10]
29-Nov-2017 19:50:28.217 WARNING [http-nio-8080-exec-19] com.mchange.v2.c3p0.management.ActiveManagementCoordinator.attemptManageC3P0Registry A C3P0Registry mbean is already registered. This probably means that an application using c3p0 was undeployed, but not all PooledDataSources were closed prior to undeployment. This may lead to resource leaks over time. Please take care to close all PooledDataSources.
19:50:28.349 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.io.ResolverUtil - Class not found: org.jboss.vfs.VFS
19:50:28.349 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.io.ResolverUtil - JBoss 6 VFS API is not available in this environment.
19:50:28.350 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.io.ResolverUtil - Class not found: org.jboss.vfs.VirtualFile
19:50:28.351 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.io.ResolverUtil - VFS implementation org.apache.ibatis.io.JBoss6VFS is not valid in this environment.
19:50:28.351 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.io.ResolverUtil - Using VFS adapter org.apache.ibatis.io.DefaultVFS
19:50:28.352 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.io.ResolverUtil - Find JAR URL: file:/usr/local/Cellar/tomcat/8.5.23/libexec/webapps/seckill/WEB-INF/classes/cn/codingxiaxw/entity/
19:50:28.352 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.io.ResolverUtil - Not a JAR: file:/usr/local/Cellar/tomcat/8.5.23/libexec/webapps/seckill/WEB-INF/classes/cn/codingxiaxw/entity/
19:50:28.352 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.io.ResolverUtil - Reader entry: Seckill.class
19:50:28.353 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.io.ResolverUtil - Reader entry: SuccessKilled.class
19:50:28.353 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.io.ResolverUtil - Listing file:/usr/local/Cellar/tomcat/8.5.23/libexec/webapps/seckill/WEB-INF/classes/cn/codingxiaxw/entity/
19:50:28.353 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.io.ResolverUtil - Find JAR URL: file:/usr/local/Cellar/tomcat/8.5.23/libexec/webapps/seckill/WEB-INF/classes/cn/codingxiaxw/entity/Seckill.class
19:50:28.353 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.io.ResolverUtil - Not a JAR: file:/usr/local/Cellar/tomcat/8.5.23/libexec/webapps/seckill/WEB-INF/classes/cn/codingxiaxw/entity/Seckill.class
19:50:28.354 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.io.ResolverUtil - Reader entry: ����1\
19:50:28.354 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.io.ResolverUtil - Find JAR URL: file:/usr/local/Cellar/tomcat/8.5.23/libexec/webapps/seckill/WEB-INF/classes/cn/codingxiaxw/entity/SuccessKilled.class
19:50:28.354 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.io.ResolverUtil - Not a JAR: file:/usr/local/Cellar/tomcat/8.5.23/libexec/webapps/seckill/WEB-INF/classes/cn/codingxiaxw/entity/SuccessKilled.class
19:50:28.354 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.io.ResolverUtil - Reader entry: ����1T
19:50:28.355 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.io.ResolverUtil - Checking to see if class cn.codingxiaxw.entity.Seckill matches criteria [is assignable to Object]
19:50:28.355 [http-nio-8080-exec-19] DEBUG org.apache.ibatis.io.ResolverUtil - Checking to see if class cn.codingxiaxw.entity.SuccessKilled matches criteria [is assignable to Object]
19:50:28.355 [http-nio-8080-exec-19] DEBUG o.m.spring.SqlSessionFactoryBean - Scanned package: 'cn.codingxiaxw.entity' for aliases
19:50:28.377 [http-nio-8080-exec-19] DEBUG o.m.spring.SqlSessionFactoryBean - Parsed configuration file: 'class path resource [mybatis-config.xml]'
19:50:28.444 [http-nio-8080-exec-19] DEBUG o.m.spring.SqlSessionFactoryBean - Parsed mapper file: 'file [/usr/local/Cellar/tomcat/8.5.23/libexec/webapps/seckill/WEB-INF/classes/mapper/SuccessKilledDao.xml]'
19:50:28.451 [http-nio-8080-exec-19] DEBUG o.m.spring.SqlSessionFactoryBean - Parsed mapper file: 'file [/usr/local/Cellar/tomcat/8.5.23/libexec/webapps/seckill/WEB-INF/classes/mapper/SeckillDao.xml]'
29-Nov-2017 19:50:28.759 INFO [http-nio-8080-exec-19] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/seckill/{seckillId}/{md5}/execution],methods=[POST],produces=[application/json;charset=UTF-8]}" onto public cn.codingxiaxw.dto.SeckillResult<cn.codingxiaxw.dto.SeckillExecution> cn.codingxiaxw.web.SeckillController.execute(java.lang.Long,java.lang.String,java.lang.Long)
29-Nov-2017 19:50:28.760 INFO [http-nio-8080-exec-19] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/seckill/list],methods=[GET]}" onto public java.lang.String cn.codingxiaxw.web.SeckillController.list(org.springframework.ui.Model)
29-Nov-2017 19:50:28.760 INFO [http-nio-8080-exec-19] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/seckill/{seckillId}/exposer],methods=[GET],produces=[application/json;charset=UTF-8]}" onto public cn.codingxiaxw.dto.SeckillResult<cn.codingxiaxw.dto.Exposer> cn.codingxiaxw.web.SeckillController.exposer(java.lang.Long)
29-Nov-2017 19:50:28.760 INFO [http-nio-8080-exec-19] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/seckill/time/now],methods=[GET]}" onto public cn.codingxiaxw.dto.SeckillResult<java.lang.Long> cn.codingxiaxw.web.SeckillController.time()
29-Nov-2017 19:50:28.760 INFO [http-nio-8080-exec-19] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/seckill/{seckillId}/detail],methods=[GET]}" onto public java.lang.String cn.codingxiaxw.web.SeckillController.detail(java.lang.Long,org.springframework.ui.Model)
29-Nov-2017 19:50:28.957 INFO [http-nio-8080-exec-19] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.initControllerAdviceCache Looking for @ControllerAdvice: WebApplicationContext for namespace 'seckill-dispatcher-servlet': startup date [Wed Nov 29 19:50:27 EST 2017]; root of context hierarchy
29-Nov-2017 19:50:28.991 INFO [http-nio-8080-exec-19] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.initControllerAdviceCache Looking for @ControllerAdvice: WebApplicationContext for namespace 'seckill-dispatcher-servlet': startup date [Wed Nov 29 19:50:27 EST 2017]; root of context hierarchy
29-Nov-2017 19:50:29.019 INFO [http-nio-8080-exec-19] org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.registerHandler Mapped URL path [/**] onto handler 'org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0'
29-Nov-2017 19:50:29.050 INFO [http-nio-8080-exec-19] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'seckill-dispatcher': initialization completed in 1380 ms
@viakiba
Copy link

viakiba commented Nov 30, 2017

日志没一个有用的.... 根据你的描述,建议进行一下尝试:
localhost:8080/seckill/seckill/list :第一个seckill是项目名称
localhost:8080/seckill/list:不加项目名称
参考代码

@immiao
Copy link
Author

immiao commented Nov 30, 2017

/seckill/seckill/list是500,我应该是没有配mysql。

多谢!

@immiao immiao closed this as completed Nov 30, 2017
@lucky1177214
Copy link

@immiao 你好404你解决了吗?我现在也遇到这个问题,期待你的解答!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants