开发中遇到的臭虫
开发中遇到的臭虫,俗称万恶BUG
李熠漾
22届毕业、软件工程、Java、写代码、独立思考
展开
-
Error querying database. Cause: java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符
使用Mybatis报错原因是在Mapper.xml配置文件中编写的SQL后面不能加;号,否则报错Cause: java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符原创 2021-12-07 16:42:16 · 2652 阅读 · 0 评论 -
No HttpMessageConverter for java.util.HashMap and content type “application/json“
如果响应类型就是application/json,那么就是缺少一个jackson的依赖<dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.9.7</version></dependency>...原创 2021-12-09 15:13:04 · 3754 阅读 · 0 评论 -
Origin parameter: http://localhost:8081/actuator/hystrix.stream is not in the allowed list of proxy
使用Hystrix DashBoard监控报错报错1Origin parameter: http://localhost:8081/actuator/hystrix.stream is not in the allowed list of proxy host names.If it should be allowed add it to hystrix.dashboard.proxyStreamAllowList.是因为没有配置代理地址,在application中添加下面配置hystrix:原创 2021-08-17 14:28:52 · 924 阅读 · 0 评论 -
Eureka Client 启动后自动停止
Eureka ServerEureka Server正常启动,并访问server: port: 10086spring: application: name: eureka-server security: user: name: eureka password: 123456eureka: server: enable-self-preservation: false # 关闭自我保护 eviction-interval-ti原创 2021-08-16 11:13:56 · 838 阅读 · 0 评论 -
com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known serve
Eureka 开启密码认证时报错1、Spring Cloud Eureka 客户端配置你的服务注册中心时候 没有加上你服务端安全检查的用户名和密码eureka: instance: client: serviceUrl:# defaultZone: http://localhost:10086/eureka/ defaultZone: http://eureka:123456@localhost:10086/eureka/2、未将Eureka Server中配原创 2021-08-16 10:47:52 · 254 阅读 · 0 评论 -
聚合工程,子工程maven包无法下载
聚合工程,子工程maven包无法下载原因错误重现原因使用聚合工程开发,在主项目中依赖了父依赖springboot,我们都知道springboot对版本一些依赖做了版本仲裁,如果要覆盖父项目的依赖仲裁,只需要在子项目中引入对应的version指定版本,即可覆盖。但是,而我在dependencyManagement中引入了springboot仲裁的依赖,却没有添加版本号version,我个人以为会直接使用父项目的仲裁版本,可是结果并不是,导致子项目依赖一直下不下来,我中途一直以为是idea的缓存,又或者原创 2021-07-27 16:55:03 · 368 阅读 · 1 评论 -
启动Swagger2报错Unable to infer base url. This is common when using dynamic servlet registration or when
原因: 没有开启Swagger文档配置,只需要在配置类或者启动类添加 @EnableSwagger2注解即可原创 2021-08-03 15:47:16 · 639 阅读 · 0 评论 -
Spring security使用中报错 (当前无法使用此页面localhost 重定向次数过多。 若要解决此问题,请尝试清除 Cookie.)
错误使用spring secrity中自定义了请求登录页面http.formLogin().loginPage("/toLogin"),也在视图控制器中配置了登录页面请求对应的视图但是报错页面localhost 重定向次数过多原因是因为在认证中我们没有对登录请求放行,导致未认证用于需要重定向到自定义登录请求,自定义登录请求需要访问我们的登录请求,登录请求又没放行又重定向到自定义的登录请求中,就造成了重定向死循环,最终重定向死循环报错。问题解决在授权配置方法configure(HttpSec原创 2021-08-04 10:35:31 · 4800 阅读 · 1 评论