代码异常处理
工作项目报错与解决方法
huadongqiang
这个作者很懒,什么都没留下…
展开
-
Could not resolve dependencies for project xxx The following artifacts could not be resolved:
问题:Failed to execute goal on project dss-collector-base: Could not resolve dependencies for project com.linkcm:dss-collector-base:jar:1.0: The following artifacts could not be resolved:解决方法:删除对应包里面的 _remote.repositories 文件...原创 2021-05-28 11:51:59 · 5968 阅读 · 0 评论 -
mybatis报错:Invalid bound statement (not found)
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)解决方案:mapper.xml的namespace要写所映射接口的全称类名。mapper.xml中的每个statement的id要和接口方法的方法名相同mapper.xml中定义的每个sql的parameterType要和接口方法的形参类型相同mapper.xml中定义的每个sql的resultType要和接口方法的返回值的类型相同mapp原创 2021-03-05 10:53:37 · 205 阅读 · 1 评论 -
nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘customCollect’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire f原创 2020-12-21 14:30:12 · 9122 阅读 · 1 评论 -
static方法内使用@Autowired导入的对象
由于static方法内不允许使用非静态的方法,所以在serviceImpl中需要用到Autowired引用的对象时,需要做以下操作: 1、在该类头部添加@Component注解; ![在这里插入图片描述](https://img-blog.csdnimg.cn/20201124183341976.png#pic_center) 2、定义一个静态的类对象; ![在这里插入图片描述](https://img-blog.csdnimg.cn/20201124183909900.png?x-oss-pro.原创 2020-11-24 19:05:43 · 1361 阅读 · 0 评论 -
项目启动异常-Autowired
Description:Field sysConfig in com.linkcm.dss.core.base.BaseController required a bean of type 'com.linkcm.dss.common.config.SysConfig' that could not be found.The injection point has the following annotations: - @org.springframework.beans.factory....原创 2020-11-24 11:37:51 · 215 阅读 · 0 评论 -
项目启动异常-class path resource cannot be resolved to URL becuase is does not exist
class path resource [ config/spring/] cannot be resolved to URL because it does not exist原创 2020-11-24 11:40:37 · 1859 阅读 · 0 评论 -
redis同一个key前后存入不同类型的值报错
redis同一个key前后存入不同类型的值报错:redis.clients.jedis.exceptions.JedisDataException: WRONGTYPE Operation against a key holding the wrong kind of value先删掉旧值再存入原创 2020-11-20 17:33:15 · 1107 阅读 · 0 评论