IT修真院·坑乎 | Java(后端),CSS(前端),JavaScript(前端),PM(产品经理),UI(交互设计),QA(测试),Android(安卓APP),iOS(苹果APP),OP(运维),Python(后端)日常在线问答学习平台
咨询电话 : 010-59478634
切换导航
首页
我的提问
我的回答
我的点赞
消息通知
个人主页
×
提示
尚未登陆,前往官网登陆?
×
提示
尚未登陆,前往官网登陆?
CSS
JS
Android
IOS
JAVA
OP
PM
UI
QA
求职辅导
Python
运营
动画师
CSS
JS
Android
IOS
JAVA
OP
PM
UI
QA
求职辅导
Python
运营
动画师
所有任务
任务1
任务2
任务3
任务4
任务5
任务6
任务7
任务8
任务9
任务10
任务11
全部
问题
已收录
问题
未收录
问题
没有找到答案,去提问>>>
多模块下 applicationContext找不到
1
1
class="cursor-pointer"> 详细描述
多模块下 applicationContext找不到
SSM框架中的Dao层已经接到参数,但Mybatis无法接到该参数
0
1
class="cursor-pointer"> 详细描述
在查询collection表的时候, 查询collection表的sql语句无法获取到传入参数#{collectionName},在使用注解@Param绑定参数命名后依旧如此。 后在完全重构+重命名该模块实体、实现、mapper后问题解决,原因未知。
class="cursor-pointer"> 错误截图
显示无法接到该参数
mapper映射
dao层接口
参数校验的必要性是什么?除了参数校验我们还应该怎样防止恶意传参?
0
1
class="cursor-pointer"> 详细描述
最近写任务三service层的时候写登录接口时发现如果不在service层做好参数限制,那么很有可能会被恶意传参,对于参数校验,我们应该如何注意?
多图片上传时,使用postman测试报错500
1
1
class="cursor-pointer"> 详细描述
设置五个图片上传时,在jsp页面只上传其中一部分,没有报错,数据库中未上传字段为null,但是使用postman测试接口时,只上传一部分图片会报错集合下标异常错误。确实是代码编写有问题,但是不知道为什么在jsp页面上传就不会报错。
class="cursor-pointer"> 错误截图
controller中set方法的存放图片地址字段有5个,这里可以加入判断集合长度分别set数据,postman中的数组下标需要删除,这里没什么问题,不明白的就是为什么postman测试接口才会报错第三个图片中的错误,直接在jsp页面上传图片就不会报错。
关于如何实现垂纶小室中的功能
0
1
class="cursor-pointer"> 详细描述
垂纶小室中的作品分为一级,二级和三级,三级为作品集,我是通过建了三张表,来保存。但是师兄说这种方法不好,使用起来可能不高效。让我寻找另一种方法,我查到可以设置parent_id来显示层级关系,这个很重要,如何设计我脑海里已经有了数,但是还有一种通过编码的方式实现层级关系,这个我没搞懂,希望哪个师兄给我解答一下。
mybatis generator 逆向生成插件,通配符错误
0
1
class="cursor-pointer"> 详细描述
在table标签中添加%,应该是将table下面的所有表都查出来,但是为什么用了通配符之后,把所有数据库下面所有的表都建出来了
class="cursor-pointer"> 错误截图
service层应该怎样开发,可以包含DAO以外的方法吗?
1
1
class="cursor-pointer"> 详细描述
我们现在写的业务逻辑层经常只包含对应的DAO方法,感觉不如直接调用DAO,为什么需要service层呢?
无法根据输入的id获取到信息,排查了很久都没有找出原因
0
1
class="cursor-pointer"> 详细描述
期间有换过驱动版本,发现并不是这个问题;连接池也换过,不起作用
class="cursor-pointer"> 错误截图
Controller中,访问带有占位符的uri地址时,浏览器输不能识别
0
1
class="cursor-pointer"> 详细描述
Controller中使用rest风格的uri,如:@RequestMapping(value = "/categorys/{uperId}/2",method = RequestMethod.GET) 这里入参使用了@PathVariable注解,在浏览器中直接输入localhost:8080/api/categorys/{uperId}/2?uperId=2 时,2不能赋值到{uperId}里
class="cursor-pointer"> 错误截图
DispatcherServlet with name 'springmvc-dispatcher' processing GET request for [/json/categorys/%7BuperId%7D/2] [DEBUG] 2019-08-14 09:24:58,018 method:org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:310) Looking up handler method for path /json/categorys/{uperId}/2 [DEBUG] 2019-08-14 09:24:58,033 method:org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.getHandlerInternal(AbstractHandlerMethodMapping.java:317) Returning handler method [public java.util.Map
com.jnshu.controller.JsonController.getFirstCategory(java.lang.Integer)] [DEBUG] 2019-08-14 09:24:58,033 method:org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:251) Returning cached instance of singleton bean 'jsonController' [DEBUG] 2019-08-14 09:24:58,034 method:org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:955) Last-Modified value for [/json/categorys/%7BuperId%7D/2] is: -1 [DEBUG] 2019-08-14 09:24:58,078 method:org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:164) Failed to resolve argument 0 of type 'java.lang.Integer' org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is java.lang.NumberFormatException: For input string: "{uperId}" at org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.resolveArgument(AbstractNamedValueMethodArgumentResolver.java:128) at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:121) at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:158) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:128) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NumberFormatException: For input string: "{uperId}" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:580) at java.lang.Integer.valueOf(Integer.java:766) at org.springframework.util.NumberUtils.parseNumber(NumberUtils.java:208) at org.springframework.beans.propertyeditors.CustomNumberEditor.setAsText(CustomNumberEditor.java:113) at org.springframework.beans.TypeConverterDelegate.doConvertTextValue(TypeConverterDelegate.java:468) at org.springframework.beans.TypeConverterDelegate.doConvertValue(TypeConverterDelegate.java:441) at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:199) at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:108) at org.springframework.beans.TypeConverterSupport.doConvert(TypeConverterSupport.java:64) at org.springframework.beans.TypeConverterSupport.convertIfNecessary(TypeConverterSupport.java:47) at org.springframework.validation.DataBinder.convertIfNecessary(DataBinder.java:713) at org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.resolveArgument(AbstractNamedValueMethodArgumentResolver.java:120) ... 36 more [DEBUG] 2019-08-14 09:24:58,080 method:org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:133) Resolving exception from handler [public java.util.Map
com.jnshu.controller.JsonController.getFirstCategory(java.lang.Integer)]: org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is java.lang.NumberFormatException: For input string: "{uperId}" [DEBUG] 2019-08-14 09:24:58,083 method:org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:133) Resolving exception from handler [public java.util.Map
com.jnshu.controller.JsonController.getFirstCategory(java.lang.Integer)]: org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is java.lang.NumberFormatException: For input string: "{uperId}" [DEBUG] 2019-08-14 09:24:58,083 method:org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:133) Resolving exception from handler [public java.util.Map
com.jnshu.controller.JsonController.getFirstCategory(java.lang.Integer)]: org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is java.lang.NumberFormatException: For input string: "{uperId}" [DEBUG] 2019-08-14 09:24:58,084 method:org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:133) Resolving exception from handler [public java.util.Map
com.jnshu.controller.JsonController.getFirstCategory(java.lang.Integer)]: org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is java.lang.NumberFormatException: For input string: "{uperId}" [DEBUG] 2019-08-14 09:24:58,084 method:org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:133) Resolving exception from handler [public java.util.Map
com.jnshu.controller.JsonController.getFirstCategory(java.lang.Integer)]: org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is java.lang.NumberFormatException: For input string: "{uperId}" [DEBUG] 2019-08-14 09:24:58,084 method:org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:133) Resolving exception from handler [public java.util.Map
com.jnshu.controller.JsonController.getFirstCategory(java.lang.Integer)]: org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is java.lang.NumberFormatException: For input string: "{uperId}" [DEBUG] 2019-08-14 09:24:58,084 method:org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:133) Resolving exception from handler [public java.util.Map
com.jnshu.controller.JsonController.getFirstCategory(java.lang.Integer)]: org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is java.lang.NumberFormatException: For input string: "{uperId}" [WARN ] 2019-08-14 09:24:58,119 method:org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver.handleTypeMismatch(DefaultHandlerExceptionResolver.java:361) Failed to bind request element: org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'java.lang.Integer'; nested exception is java.lang.NumberFormatException: For input string: "{uperId}" [DEBUG] 2019-08-14 09:24:58,120 method:org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1048) Null ModelAndView returned to DispatcherServlet with name 'springmvc-dispatcher': assuming HandlerAdapter completed request handling [DEBUG] 2019-08-14 09:24:58,120 method:org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1000) Successfully completed request
class="cursor-pointer"> 源码
/*由一级目录查看二级目录*/ @RequestMapping(value = "/categorys/{uperId}/2",method = RequestMethod.GET)@ResponseBodypublic Map
getFirstCategory(@PathVariable Integer uperId){ Map
categorys = new HashMap<>(); if(uperId==1){ Category c1 = new Category(); c1.setId(4); c1.setName("李白"); c1.setUpperId(0); Category c2 = new Category(); c2.setId(5); c2.setName("杜甫"); c2.setUpperId(0); Category c3 = new Category(); c3.setId(6); c3.setName("白居易"); c3.setUpperId(0); categorys.put("诗人1",c1); categorys.put("诗人2",c2); categorys.put("诗人3",c3); return categorys; }else { Category c1 = new Category(); c1.setId(7); c1.setName("唐伯虎"); c1.setUpperId(0); Category c2 = new Category(); c2.setId(8); c2.setName("祝枝山"); c2.setUpperId(0); Category c3 = new Category(); c3.setId(9); c3.setName("张择端"); c3.setUpperId(0); categorys.put("画家1",c1); categorys.put("画家2",c2); categorys.put("画家3",c3); return categorys; }}
nginx是做什么的?
2
1
Nginx
class="cursor-pointer"> 详细描述
nginx是做什么的?
class="cursor-pointer"> 错误截图
首页
<
7
8
9
10
11
12
13
14
15
16
17
>
末页
去第
页
确定
Copyright ©2015 北京葡萄藤信息技术有限公司 All Rights Reserved | 京ICP备15035574号-1
6
5
10