
spring 问题总结
在奋斗的大道
程序发烧友
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
SpringBoot 提示:RequestRejectedException:The request was rejected because the URL was not normalized.
今天遇到一个问题:本地磁盘通过SpringMVC 资源映射成URL地址可以访问的资源,提示如下错误信息:RequestRejectedException:The request was rejected because the URL was not normalized.错误的大致意思:请求资源的URL地址不规范错误。造成错误发生的原因由于我项目集成SpringSecurity 框架,在此框架中存在一个HttpFirewall接口。主要用于:用于拒绝潜在危险请求。HttpFirew原创 2022-01-13 20:03:31 · 3821 阅读 · 0 评论 -
SpringBoot 集成Redisson 提示:java.lang.ClassNotFoundException: **.redis.connection.ReactiveRedisConnec
SpringBoot 集成Redisson 提示如下错误信息:Caused by: java.lang.ClassNotFoundException: org.springframework.data.redis.connection.ReactiveRedisConnectionFactorySpirngBoot +Redisson 版本信息名称 版本 SpringBoot 1.5.18 Redisson 3.13.6 错误Pom.xml 依赖 <原创 2022-01-04 18:51:48 · 4233 阅读 · 0 评论 -
Spring 集成异步任务线程池
功能概述:Spring通过实例化任务执行器(TaskExecutor)来构建一个任务线程池。而实际开发中有些任务一般是非阻碍的,即异步的,所以要在配置类中通过@EnableAsync开启对异步任务的支持,并通过在实例Bean的方法上使用@Async注解来声明其是一个异步任务。异步任务线程池实现整体步骤:1、编写一个任务线程类,在spring 中通过实现org.springframework.scheduling.annotation.AsyncConfigurer接口,并覆写相关方法。原创 2021-08-19 18:39:22 · 1669 阅读 · 0 评论 -
SpringBoot 不同版本配置项目名称(坑)
问题描述:今天和公司前端工程师对接一个简单项目时(前后端分离,使用nginx 代理),前端请求后台服务接口总是提示:403 资源不可用。nginx 配置文件如下:server { listen 7098; server_name 192.168.1.74 localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root原创 2021-01-28 17:03:40 · 1023 阅读 · 0 评论 -
SpringBoot2.x 集成Kafka 提示:java.lang.ClassNotFoundException: org.springframework.kafka.transaction.***
错误异常信息:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.kafka.KafkaAnnotationDrivenConfiguration': Unexpected exception during bean creation; nested exception is java.lang.Typ原创 2021-01-18 10:11:38 · 2237 阅读 · 0 评论 -
SpringSecurity 提示ProviderNotFoundException: No AuthenticationProvider found for ****
今天在实现SpringSecurity 集成多种认证方式:密码模式+ 验证码模式 时,密码模式正常返回执行并返回Token ,验证码模式:总是提示上述错误信息:ProviderNotFoundException: No AuthenticationProvider found for ****问题解决:报错代码发生在:ProviderManager.authenticate()方法的235行,错误源码输出如下:源码上已经标识产生错误的原因: provider.authenticat.原创 2021-01-13 21:03:33 · 18732 阅读 · 5 评论 -
SpringBoot 提示: Cannot construct instance of `*` (no Creators, like default construct, exist)
SpringBoot 提示:Cannot construct instance ofcom.digipower.sercurity.entity.JwtUserDetails(no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator) at [Source: (org.apache.catalina.connector...原创 2021-01-13 15:08:09 · 14689 阅读 · 2 评论 -
springboot 提示The hierarchy of the type ** is inconsistent
SpringBoot 启动提示:The hierarchy of the type ** is inconsistent原因:该类或其父类所在的jar包没有被引入建议解决方案:从该类的父类开始跟踪源码,找到其所在的jar包并引入项目中一般是因为 缺少依赖添加上依赖即可 <!-- 集中定义管理依赖版本号 --> <properties> <servlet-api.version>3.1.0</servlet-api.version>原创 2021-01-13 14:57:07 · 658 阅读 · 0 评论 -
Dubbo 提示:qos-server can not bind localhost:22222
今天在公司的测试服务器上部署两个springboot jar文件运行包,启动第一个springboot jar 正常,启动第二个springboot jar包时,提示如下错误信息: [DUBBO] qos-server can not bind localhost:22222, dubbo version: 2.7.1, current host: 192.168.238.1java.n...原创 2019-12-11 19:06:42 · 1437 阅读 · 0 评论 -
The type org.springframework.dao.support.DaoSupport cannot be resolved. It is indirectly referenced
springBoot 整合Mybatis 提示:The type org.springframework.dao.support.DaoSupport cannot be resolved. It is indirectly referenced from required .class files经过查询发现缺失:spring-tx.jar包添加相关jar 包依赖:<!--s...原创 2019-04-18 11:45:29 · 535 阅读 · 0 评论 -
Spring 提示:无法找到元素 'aop:aspectj-autoproxy'
问题描述:org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 18 in XML document from class path resource [e_aop_anno/bean.xml] is invalid; nested exception is org.xml.sax.SAXPars原创 2017-02-17 18:01:32 · 2994 阅读 · 0 评论 -
import 简化Spring 配置文件
对于编写SSH程序的程序员来说,Spring的配置文件(applicationContext.xml)是一个非常让人头疼的一个问题,自己的一个不小心会导致,项目的异常或者更为严重的是项目无法启动。如何解决applicationContext.xml 配置文件臃肿的问题,是本篇文章讨论的重点。对于一个拥有丰富编码经验的工程师,一定会想到使用"import"策略,优化applicationContex原创 2015-08-25 01:43:58 · 630 阅读 · 0 评论 -
Spring MVC 提示:HTTP Status 404 - /**/**
今天在编写Spring Security 自定义页面登入提示:HTTP Status 404 - /SpringSecurity/login.actionspring_mvc.xml 配置文件:<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.原创 2016-03-18 16:28:46 · 7085 阅读 · 0 评论 -
Spring Security 引用数据库管理用户权限-----login.jsp 提示"用户名或密码错误"
错误展示:相关spring-security.xml 配置文件和spring-mybatis.xml 文件<beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="原创 2016-03-19 15:58:42 · 2302 阅读 · 0 评论 -
Spring aop报错:com.sun.proxy.$Proxyxxx cannot be cast to yyy
在使用Spring AOP时,遇到如下的错误:Exception in thread "main" java.lang.ClassCastException: com.sun.proxy.$Proxy0 cannot be cast to com.spring.test.setter.Instrumentalistat com.spring.test.setter.test.main(te转载 2016-03-14 10:34:54 · 4602 阅读 · 1 评论 -
ssm(spring+springMVC+mybatis)框架整合mongodb3.2.6提示Cannot resolve the name 'repository:auditing-attribut
今天在整合ssm(spring+springMVC+mybatis)框架与mongodb3.2.6(NoSQL)提示了一个异常:src-resolve: Cannot resolve the name 'repository:auditing-attributes' to a(n) 'attribute group' component. 这个异常的大概意思是:"无法识别名称repositor原创 2016-05-18 13:35:33 · 3403 阅读 · 0 评论 -
springMVC ResponseBody 返回汉字乱码解决方案
本文查考借鉴:http://blog.yimik.com/archives/899js里通过ajax调用springmvc,后台返回的中文字符串乱码,通过搜索找解决方,大都让配置StringHttpMessageConverter这个bean来纠正编码问题,但是我用之后死活不生效,无奈跟踪代码,发现一次请求中根本就没有调用到org.springframework.web.servlet转载 2016-06-12 11:38:40 · 625 阅读 · 0 评论 -
spring 通过中间层工具类SpringBeanFactoryUtils 实现service 注入
SpringBeanFactoryUtils 源代码:package com.common.common.util;import org.springframework.beans.BeansException;import org.springframework.context.ApplicationContext;import org.springframework.contex原创 2016-10-26 17:24:51 · 4932 阅读 · 0 评论 -
SpringMVC:No mapping found for HTTP request with URI [/account/*] in DispatcherServlet with
问题描述:No mapping found for HTTP request with URI [/account/*] in DispatcherServlet with name "spring-servlet"问题解决办法:原创 2017-02-17 17:56:47 · 1588 阅读 · 0 评论 -
Attribute "scope" must be declared for element type "bean"
在配置Spring实体Bean文件时,提示如下截图错误:进过一番百度,谷歌之后。出错的原因:原来Attribute "scope" 在spring2.0以后支持。spring的XML配置文件的这个: "http://www.springframework.org/dtd/spring-beans.dtd">改成这个就可以了:原创 2015-08-25 01:28:03 · 706 阅读 · 0 评论