127.0.0.1:8080/sell/buyer/product/list
来源:5-3 买家商品-api(上)
qq_忧伤还是快乐_4
2018-01-13
错误代码404
Type Status Report
Message /sell/buyer/product/list
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
详情请看附件
ide返回信息
2018-01-13 00:13:42.931 INFO 13080 --- [ main] c.i.service.impl.ProductServicelmplTest : Starting ProductServicelmplTest on DESKTOP-17716SB with PID 13080 (started by TnjK in E:\U盘\java\spring-boot\NeW\sell)
2018-01-13 00:13:42.933 INFO 13080 --- [ main] c.i.service.impl.ProductServicelmplTest : No active profile set, falling back to default profiles: default
2018-01-13 00:13:43.142 INFO 13080 --- [ main] o.s.w.c.s.GenericWebApplicationContext : Refreshing org.springframework.web.context.support.GenericWebApplicationContext@4b8ee4de: startup date [Sat Jan 13 00:13:43 CST 2018]; root of context hierarchy
2018-01-13 00:13:47.229 INFO 13080 --- [ main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2018-01-13 00:13:47.276 INFO 13080 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: default
...]
2018-01-13 00:13:47.551 INFO 13080 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {5.0.12.Final}
2018-01-13 00:13:47.556 INFO 13080 --- [ main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2018-01-13 00:13:47.560 INFO 13080 --- [ main] org.hibernate.cfg.Environment : HHH000021: Bytecode provider name : javassist
2018-01-13 00:13:47.680 INFO 13080 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2018-01-13 00:13:48.151 INFO 13080 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2018-01-13 00:13:49.646 INFO 13080 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2018-01-13 00:13:51.581 INFO 13080 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.web.context.support.GenericWebApplicationContext@4b8ee4de: startup date [Sat Jan 13 00:13:43 CST 2018]; root of context hierarchy
2018-01-13 00:13:51.823 INFO 13080 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/buyer/product/list],methods=[GET]}" onto public com.imooc.VO.ResultVO com.imooc.controller.BuyerProductController.list()
2018-01-13 00:13:51.831 INFO 13080 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2018-01-13 00:13:51.832 INFO 13080 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-01-13 00:13:51.906 INFO 13080 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-01-13 00:13:51.906 INFO 13080 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-01-13 00:13:52.064 INFO 13080 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-01-13 00:13:52.780 INFO 13080 --- [ main] c.i.service.impl.ProductServicelmplTest : Started ProductServicelmplTest in 10.985 seconds (JVM running for 13.331)
Hibernate: select productinf0_.product_id as product_1_1_0_, productinf0_.category_type as category2_1_0_, productinf0_.product_description as product_3_1_0_, productinf0_.product_icon as product_4_1_0_, productinf0_.product_name as product_5_1_0_, productinf0_.product_price as product_6_1_0_, productinf0_.product_status as product_7_1_0_, productinf0_.product_stock as product_8_1_0_ from product_info productinf0_ where productinf0_.product_id=?
Hibernate: update product_info set category_type=?, product_description=?, product_icon=?, product_name=?, product_price=?, product_status=?, product_stock=? where product_id=?
2018-01-13 00:13:53.103 INFO 13080 --- [ Thread-3] o.s.w.c.s.GenericWebApplicationContext : Closing org.springframework.web.context.support.GenericWebApplicationContext@4b8ee4de: startup date [Sat Jan 13 00:13:43 CST 2018]; root of context hierarchy
2018-01-13 00:13:53.109 INFO 13080 --- [ Thread-3] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2回答
-
qq_忧伤还是快乐_4
提问者
2018-01-13
ip搞错了。
url不应该是liunx系统的ip 也就不是 http://192.168.0.67:8080/sell/buyer/product/list
url应该是 http://127.0.0.1:8080/sell/buyer/product/list 或者 http://localhost:8080/sell/buyer/product/list
代入感的问题。老是想错了。
30 -
Meet相识
2018-01-13
从你发的图片上来看,你启动了测试类,出现绿条说明测试成功了
但是你并没有启动springboot项目,测试类成功后测试程序就退出了,你看见404的界面是自己启动的tomcat吧
Springboot有内置的tomcat,不用自己启动。你应该直接启动SellApplication的main函数就可以了10
相似问题