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
全部
问题
已收录
问题
未收录
问题
没有找到答案,去提问>>>
在进行运行时出现Error querying database
0
1
class="cursor-pointer"> 详细描述
在进行测试接口的时候出现链接数据库的问题,我换了mysql驱动的版本,还是这个问题。提示我是mybatis自动生成的文件有错误。我检查了很久没有问题。
校验要写的多细
1
1
class="cursor-pointer"> 详细描述
是不是凡事会传参的地方都要写校验。比如要传个数字,是不是要写判空,判断是数字,数字的大小范围。不能是小数。等待,多个校验。
idea 下 tomcat 日志乱码
1
1
class="cursor-pointer"> 详细描述
log乱码示例: 31-May-2020 16:17:34.353 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.鏈嶅姟鍣ㄧ増鏈�: Apache Tomcat/9.0.35 31-May-2020 16:17:34.355 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鏈嶅姟鍣ㄦ瀯寤�: May 5 2020 20:36:20 UTC 31-May-2020 16:17:34.355 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鏈嶅姟鍣ㄧ増鏈彿(: 9.0.35.0 31-May-2020 16:17:34.355 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鎿嶄綔绯荤粺鍚嶇О: Windows 10 31-May-2020 16:17:34.356 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log OS.鐗堟湰: 10.0 31-May-2020 16:17:34.356 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鏋舵瀯: amd64 31-May-2020 16:17:34.356 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Java 鐜鍙橀噺: C:\Program Files\Java\jdk1.8.0_231\jre 31-May-2020 16:17:34.356 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Java铏氭嫙鏈虹増鏈�: 1.8.0_231-b11 31-May-2020 16:17:34.356 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM.渚涘簲鍟�: Oracle Corporation 31-May-2020 16:17:34.356 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\owlwinter\.IntelliJIdea2019.3\system\tomcat\Unnamed_Image-Studio_2 31-May-2020 16:17:34.356 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: D:\apache-tomcat-9.0.35 31-May-2020 16:17:34.356 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鍛戒护琛屽弬鏁帮細-Djava.util.logging.config.file=C:\Users\owlwinter\.IntelliJIdea2019.3\system\tomcat\Unnamed_Image-Studio_2\conf\logging.properties 31-May-2020 16:17:34.357 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鍛戒护琛屽弬鏁帮細-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 31-May-2020 16:17:34.357 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鍛戒护琛屽弬鏁帮細-Dcom.sun.management.jmxremote= 31-May-2020 16:17:34.357 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鍛戒护琛屽弬鏁帮細-Dcom.sun.management.jmxremote.port=1099 31-May-2020 16:17:34.357 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鍛戒护琛屽弬鏁帮細-Dcom.sun.management.jmxremote.ssl=false 31-May-2020 16:17:34.357 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鍛戒护琛屽弬鏁帮細-Dcom.sun.management.jmxremote.password.file=C:\Users\owlwinter\.IntelliJIdea2019.3\system\tomcat\Unnamed_Image-Studio_2\jmxremote.password 31-May-2020 16:17:34.358 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鍛戒护琛屽弬鏁帮細-Dcom.sun.management.jmxremote.access.file=C:\Users\owlwinter\.IntelliJIdea2019.3\system\tomcat\Unnamed_Image-Studio_2\jmxremote.access 31-May-2020 16:17:34.358 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鍛戒护琛屽弬鏁帮細-Djava.rmi.server.hostname=127.0.0.1 31-May-2020 16:17:34.358 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鍛戒护琛屽弬鏁帮細-Djdk.tls.ephemeralDHKeySize=2048 31-May-2020 16:17:34.359 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鍛戒护琛屽弬鏁帮細-Djava.protocol.handler.pkgs=org.apache.catalina.webresources 31-May-2020 16:17:34.359 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鍛戒护琛屽弬鏁帮細-Dignore.endorsed.dirs= 31-May-2020 16:17:34.359 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鍛戒护琛屽弬鏁帮細-Dcatalina.base=C:\Users\owlwinter\.IntelliJIdea2019.3\system\tomcat\Unnamed_Image-Studio_2 31-May-2020 16:17:34.359 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鍛戒护琛屽弬鏁帮細-Dcatalina.home=D:\apache-tomcat-9.0.35 31-May-2020 16:17:34.359 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log 鍛戒护琛屽弬鏁帮細-Djava.io.tmpdir=D:\apache-tomcat-9.0.35\temp 31-May-2020 16:17:34.359 淇℃伅 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent 鍦╦ava.library.path:[C:\Program Files\Java\jdk1.8.0_231\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\ProgramData\Anaconda3;D:\ProgramData\Anaconda3\Library\mingw-w64\bin;D:\ProgramData\Anaconda3\Library\usr\bin;D:\ProgramData\Anaconda3\Library\bin;D:\ProgramData\Anaconda3\Scripts;D:\Program Files (x86)\NetSarang\Xftp 6\;D:\Program Files (x86)\NetSarang\Xshell 6\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\Program Files (x86)\Calibre2\;C:\Program Files\Java\jdk1.8.0_231\bin;D:\apache-maven\bin;D:\mysql\bin;D:\Program Files\Git\cmd;D:\Program Files\VisualSVN Server\bin;D:\Program Files\TortoiseSVN\bin;C:\Users\owlwinter\AppData\Local\Microsoft\WindowsApps;D:\Wind\WWT\bin\;C:\Users\owlwinter\AppData\Local\GitHubDesktop\bin;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;;.]涓婃壘涓嶅埌鍩轰簬APR鐨凙pache Tomcat鏈満搴擄紝璇ュ簱鍏佽鍦ㄧ敓浜х幆澧冧腑鑾峰緱鏈�浣虫�ц兘 31-May-2020 16:17:34.669 淇℃伅 [main] org.apache.coyote.AbstractProtocol.init 鍒濆鍖栧崗璁鐞嗗櫒 ["http-nio-8080"] 31-May-2020 16:17:34.710 淇℃伅 [main] org.apache.catalina.startup.Catalina.load 鏈嶅姟鍣ㄥ湪[627]姣鍐呭垵濮嬪寲 31-May-2020 16:17:34.740 淇℃伅 [main] org.apache.catalina.core.StandardService.startInternal 姝e湪鍚姩鏈嶅姟[Catalina] 31-May-2020 16:17:34.740 淇℃伅 [main] org.apache.catalina.core.StandardEngine.startInternal 姝e湪鍚姩 Servlet 寮曟搸锛歔Apache Tomcat/9.0.35] 31-May-2020 16:17:34.754 淇℃伅 [main] org.apache.coyote.AbstractProtocol.start 寮�濮嬪崗璁鐞嗗彞鏌刐"http-nio-8080"] 31-May-2020 16:17:34.768 淇℃伅 [main] org.apache.catalina.startup.Catalina.start [57]姣鍚庢湇鍔″櫒鍚姩
class="cursor-pointer"> 错误截图
tomcat log乱码截图
垂纶小室中艺术家信息模块该如何处理
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日志的时候怎么能准确抓到请求响应时间这一栏
0
1
Nginx
class="cursor-pointer"> 详细描述
就是我在nginx的日志里面添加了request_time这一栏,怎么使用脚本命令准确抓出这一个数据
关于任务三
0
1
class="cursor-pointer"> 详细描述
任务三的接口文档梳理非常繁琐,不知道以后在开发中是不是也要遵循这样的标准,还有就是任务三前后端交互的话如何实现数据的传输,是否通过任务二当中我们写定好的json
postman测试接口删除(修改)时,不出现页面
0
1
class="cursor-pointer"> 详细描述
postman提示JSPs only permit GET POST or HEAD
单元测试报错无法找到可测试的方法
1
1
class="cursor-pointer"> 详细描述
无法找到可测试的方法 java.lang.Exception: No runnable methods at org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(BlockJUnit4ClassRunner.java:191) at org.junit.runners.BlockJUnit4ClassRunner.collectInitializationErrors(BlockJUnit4ClassRunner.java:128) at org.junit.runners.ParentRunner.validate(ParentRunner.java:416) at org.junit.runners.ParentRunner.
(ParentRunner.java:84) at org.junit.runners.BlockJUnit4ClassRunner.
(BlockJUnit4ClassRunner.java:65) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.
(SpringJUnit4ClassRunner.java:138) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104) at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33) at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:36) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:49) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
class="cursor-pointer"> 错误截图
shiro配置过程中,一直报错
0
1
class="cursor-pointer"> 详细描述
Error creating bean with name 'shiroFilter' defined in class path resource [spring/spring-mybatis.xml]
class="cursor-pointer"> 错误截图
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in class path resource [spring/spring-mybatis.xml]: Cannot resolve reference to bean 'securityManager' while setting bean property 'securityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [spring/spring-mybatis.xml]: Cannot resolve reference to bean 'myRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myRealm': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'shiro.service.T_userService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)} at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1537) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1284) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:237) at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:703) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:528) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632) at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1740) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357) at sun.rmi.transport.Transport$1.run(Transport.java:200) at sun.rmi.transport.Transport$1.run(Transport.java:197) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:196) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [spring/spring-mybatis.xml]: Cannot resolve reference to bean 'myRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myRealm': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'shiro.service.T_userService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)} at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1537) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1284) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351) ... 60 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myRealm': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'shiro.service.T_userService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)} at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:321) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1272) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351) ... 70 more Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'shiro.service.T_userService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)} at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1493) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1104) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:518) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:496) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:627) at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:169) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:318) ... 78 more
首页
<
6
7
8
9
10
11
12
13
14
15
16
>
末页
去第
页
确定
Copyright ©2015 北京葡萄藤信息技术有限公司 All Rights Reserved | 京ICP备15035574号-1
6
5
10