
Java异常
Java异常解析
散落的流沙
立志要如山,行道要如水。不如山,不能坚定,不如水,不能曲达。
展开
-
Feign客户端415错误:FeignException$UnsupportedMediaType: [415 ]
FeignException$UnsupportedMediaType原创 2022-04-12 10:04:28 · 3358 阅读 · 1 评论 -
跨域配置报错: When allowCredentials is true, allowedOrigins cannot contain the special value “*“
问题:在SpringBoot工程中配置跨域请求,启动项目后访问swagger页面报错: java.lang.IllegalArgumentException: When allowCredentials is true, allowedOrigins cannot contain the special value "*" since that cannot be set on the "Access-Control-Allow-Origin" response header. To allow cr原创 2022-01-12 15:12:30 · 2542 阅读 · 0 评论 -
Spring Boot Configuration Annotation Proessor not found in classpath
问题1:项目提示Spring Boot Configuration Annotation Proessor not found in classpath。 问题2:在Spring Boot项目中使用注解@ConfigurationProperties时,注解报错, 提示Not registered via @EnableConfigurationProperties or marked as Spring component。 解决方案: 问题1:在pom.xml中添加依赖: <dep原创 2022-01-12 14:29:50 · 692 阅读 · 0 评论 -
mybatis自动生成代码时报错:The server time zone value ‘�й���ʱ��‘ is unrecognized or represents more than one
这种情况一般是因为在generatorConfig.xml文件中,连接数据库时缺少serverTimeZone导致的,在数据库连接上加上serverTimeZone=UTC即可解决。 generatorConfig.xml代码如下: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator..原创 2022-01-12 12:54:42 · 693 阅读 · 0 评论 -
Swagger启动报错Failed to start bean ‘documentationPluginsBootstrapper‘
SpringBoot项目中启动Swagger如果报以下错误,可以通过两种方案解决: org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException 这种错误是因为SpringBoot版本和Swagger版本不匹配导致的,博主Swagg原创 2022-01-12 11:44:29 · 4839 阅读 · 4 评论 -
启动tomcat服务器时,报java.io.FileNotFoundException: Could not resolve XML resource ...错误
今天构建maven工程并配置完成后,启动tomcat时,控制台报java.io.FileNotFoundException: Could not resolve XML resource ...,然后在博客上查看了一下,现在留个总结。 这种错误通常是因为使用了tomcat 6.0.35以后的版本造成,解决方案有两种: 1、使用tomcat 6.0.35以前的版本; 2、找到tomcat下的c...原创 2019-03-10 01:03:59 · 4079 阅读 · 0 评论 -
SpringBoot启动报错-Property 'configuration' and 'configLocation' can not specified with together
今天修改完代码之后,重新SpringBoot项目是控制台突然报错,Property 'configuration' and 'configLocation' can not specified with together,我就黑人问号脸了,以前也没有这个错误啊。 看这个错误的情况肯定是和配置项有关了,再看configLocation,这不是我们application.properties配置文件...原创 2020-03-18 15:18:22 · 8461 阅读 · 1 评论 -
启动tomcat报错:java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed t
昨天独立做一个新项目时,搭完了基础SSM框架后启动tomcat,控制台报错: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine...原创 2019-03-21 16:50:42 · 1713 阅读 · 0 评论 -
MVC无法访问静态资源,提示No mapping found for HTTP request with URI [******] in DispatcherServlet[******]
在配置web.xml的拦截路径时写的是如下代码: <servlet-mapping> <servlet-name>SpringMVC</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> 在jsp中希望通过include的方式将...原创 2019-03-21 18:07:09 · 292 阅读 · 0 评论