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
运营
动画师
AIGC
CSS
JS
Android
IOS
JAVA
OP
PM
UI
QA
求职辅导
Python
运营
动画师
AIGC
所有任务
任务1
任务2
任务3
任务4
任务5
任务6
任务7
任务8
任务9
任务10
任务11
全部
问题
已收录
问题
未收录
问题
没有找到答案,去提问>>>
MySQL的多表查询,需要设置缓存吗?
0
1
数据库
class="cursor-pointer"> 详细描述
多表查询时,结果集是放在MySQL的缓存,还是mybatis。
使用maven插件打包的三种方式,在项目中哪种应用的多?原因是什么?
1
1
maven
class="cursor-pointer"> 详细描述
1.就我了解maven插件打包的方式有三种
2.三种方式都可以打包成可运行的包,因为还没真正接触到项目,所以想了解下在项目中,多数会用哪种方式。原因又是什么?
mybatis配置文件
1
1
springRMI
class="cursor-pointer"> 详细描述
为什么我在mybatis配置文件下,使用下面的批量扫描标签,不起作用,而用单个扫描就可以?
class="cursor-pointer"> 错误截图
关于敏捷开发的代码环节,大家彼此之间(比如后端之间)怎么合作的?
0
1
复盘踩坑
class="cursor-pointer"> 详细描述
是一个人单独写一个子系统,还是两个人一起并行开发,先搞定一个子系统?有点不会拆task....
页面点击发送验证码,无法保持页面(跳转或更新)
1
1
第三方API调用
class="cursor-pointer"> 详细描述
跳到controller必须有跳转,无法保持在页面上。
class="cursor-pointer"> 错误截图
点击按钮之后会跳转或刷新。
垂纶小室中艺术家信息模块该如何处理
0
1
class="cursor-pointer"> 详细描述
垂纶小室项目中,艺术家信息的格式是否也要于图片的格式相同(一张图片对应一个图片的描述信息), 因为艺术家信息模块里面设计到多张图片对应一个描述 如果格式不同应该怎么处理为好 (目前的处理方法是把艺术家里面的图片和其他图片写在一个表里,相同对待)
class="cursor-pointer"> 错误截图
修真院的项目实例
quartz 如何让定时任务全部执行完毕后自动关闭
0
1
quartz
class="cursor-pointer"> 详细描述
quartz 如何让定时任务全部执行完毕后自动关闭, 我的定时执行完后,还会一直挂在哪不停止
class="cursor-pointer"> 源码
public static void main(String[] args) throws SchedulerException { //创建一个jobDetail的实例,将该实例与HelloJob Class绑定 JobDetail jobDetail= JobBuilder.newJob(QuartzDemo.class).withIdentity("my job").build(); //cronTrigger cron表达式 0 0/5 18 * * ? 每天18点到18.59 每隔5分钟触发 // https://www.pppet.net/ 在线cron表达式编写 CronTrigger cronTrigger=TriggerBuilder.newTrigger().withIdentity("cronTrigger") .withSchedule(CronScheduleBuilder.cronSchedule("0 0/1 19 * * ?")).build(); //创建schedule实例 StdSchedulerFactory factory=new StdSchedulerFactory(); Scheduler scheduler=factory.getScheduler(); scheduler.start(); scheduler.scheduleJob(jobDetail,cronTrigger); }
Tiles框架的疑问
2
1
tiles
class="cursor-pointer"> 详细描述
初次接触Tiles框架不知道从哪里开始学习,有没有用好的教程
如何发送验证码
1
1
第三方API调用
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; }}
首页
<
1
2
3
4
5
6
7
8
9
>
末页
去第
页
确定
Copyright ©2015 北京葡萄藤信息技术有限公司 All Rights Reserved | 京ICP备15035574号-1
5
0
10