遇到的报错及解决方式记录
关于Spring中遇到的报错积累
好俗好麻烦
这个作者很懒,什么都没留下…
展开
-
sql injection violation, dbType mysql, druid-version 1.2.5, multi-statement not allow : UPDAT
报错信息Caused by: java.sql.SQLException: sql injection violation, multi-statement not allow : UPDATE xxx表名错误原因分析违反sql注入:批量的操作不被允许Druid的防火墙配置(Wall)中变量multiStatementAllow默认为false,导致被拦截解决方式方法一:修改连接字符串并且新增配置类①// 增加 allowMultiQueries=true// 例spring:原创 2022-03-25 11:13:43 · 17462 阅读 · 5 评论 -
cannot access com.baomidou.mybatisplus.extension.activerecord.model
cannot access com.baomidou.mybatisplus.extension.activerecord.model缺少依赖 <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-extension</artifactId> </dependency>原创 2021-09-17 11:19:58 · 4242 阅读 · 0 评论 -
java.lang.IllegalArgumentException: Result Maps collection does not contain value for com.central.us
报错信息:java.lang.IllegalArgumentException: Result Maps collection does not contain value for com.central.user.mapper.SysRoleMenuMapper.SysMenu错误出在mapper.xml文件中,查询返回类型是List,那么在mapper.xml中的返回要用resultType指定类,而不能使用resultMapList<SysMenu> findMenusByRoleI原创 2021-09-03 10:10:21 · 326 阅读 · 0 评论 -
java.lang.IllegalStateException: PathVariable annotation was empty on param 0
@PathVariable缺少value属性值错误代码 /** * 根据userId查询用户所有角色 */ @GetMapping(value = "/users/{id}/roles") List<SysRole> findRolesByUserId(@PathVariable Long id);正确代码 /** * 根据userId查询用户所有角色 */ @GetMapping(value = "/user原创 2021-09-03 09:49:34 · 549 阅读 · 1 评论 -
failed to req API:/nacos/v1/ns/instance after all servers() tried: ErrCode: 503
背景情况修改了本地ip浏览器访问通过,ping 域名也是通的,telnet 域名 + 端口通过但是服务注册时,报错failed to req API:/nacos/v1/ns/instance after all servers() tried: ErrCode: 503 ErrMsg:server is DOWN now, please try again later!因为报错说nacos服务down了,所以先到服务器检查下nacos,ps rf | grep nacos 发现服务正常 没原创 2021-08-24 10:16:40 · 2791 阅读 · 0 评论 -
Springboot错误记录 org.springframework.web.client.HttpClientErrorException$Unauthorized: 401 : [no body]
org.springframework.web.client.HttpClientErrorException$Unauthorized: 401 : [no body]可能的错误原因:client_id或者client_secret缺失或与数据库存储的不一致原创 2021-08-16 13:49:20 · 4241 阅读 · 0 评论 -
spring cloud启动报错 java.lang.IllegalStateException: Failed to load property source from...
报错信息java.lang.IllegalStateException: Failed to load property source from 'file:/D:/Project/paascloud-master-nstl/paascloud-provider/paascloud-provider-uac/target/classes/bootstrap.yml' (classpath:/bootstrap.yml) at org.springframework.boot.context.config原创 2020-12-25 13:38:21 · 2528 阅读 · 3 评论 -
java.lang.TypeNotPresentException: Type javax.xml.bind.JAXBContext not present
启动eureka 报错 java.lang.TypeNotPresentException: Type javax.xml.bind.JAXBContext not present详细错误java.lang.TypeNotPresentException: Type javax.xml.bind.JAXBContext not present at java.base/sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType原创 2020-10-15 16:01:48 · 189 阅读 · 0 评论 -
Neither BindingResult nor plain target object for bean name ‘command‘ available as request attribute
报错信息:java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'command' available as request attribute错误原因:使用了springMVC中带有的form表单标签;该标签具有自动回显的功能,回显的内容就在request域中分为两种情况:① (不指定modelAttribute属性) 默认回显request中属性名为comman原创 2020-08-18 15:39:46 · 929 阅读 · 0 评论 -
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException
报错信息Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 13 in XML document from class path resource [cn/zzn/spring01_引入外部属性文件/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseEx原创 2020-08-03 18:37:04 · 1230 阅读 · 0 评论 -
java.sql.SQLException
报错信息严重: create connection SQLException, url: jdbc:mysql://localhost:3306/internetbookstore, errorCode 0, state 01S00java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. You must configur原创 2020-08-02 17:34:43 · 699 阅读 · 0 评论 -
org.springframework.beans.factory.BeanCreationException
报错信息Error creating bean with name 'std1' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [cn.zzn.spring01.St原创 2020-08-01 18:29:16 · 254 阅读 · 0 评论 -
org.springframework.beans.factory.NoUniqueBeanDefinitionException
报错信息org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [cn.zzn.spring01.Student] is defined: expected single matching bean but found 2: std1,std2 at org.springframework.beans.factory.support.DefaultListableBean原创 2020-08-01 18:15:15 · 226 阅读 · 0 评论