淘淘商城几个错误

Error creating bean with name 'itemController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.taotao.service.ItemService com.taotao.controller.ItemController.itemService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'itemService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.taotao.service.ItemService. No provider available for the service com.taotao.service.ItemService from the url zookeeper://127.0.0.1:2181/com.alibaba.dubbo.registry.RegistryService?application=taotao-manager-web&dubbo=2.5.3&interface=com.taotao.service.ItemService&methods=getItemById&pid=928&revision=1.0-SNAPSHOT&side=consumer&timestamp=1527688447224 to the consumer 169.254.10.106 use dubbo version 2.5.3

看到上面错误提示,发现已经去连接zookeeper了,但没有发现服务提供者.这是表现层先于服务端启动造成的,解决方法就是按顺序先启动service服务端,再启动web表现层.




Invalid bound statement (not found): com.taotao.mapper.ItemMapper.selectByPrimaryKey

ibatis绑定异常,无效的绑定,找不到对应的实现

具体表现,target-classes里面只有mapper没有xml,所以会报这个错.


解决方法:

 

  1. <resources>  
  2.             <resource>  
  3.                 <directory>src/main/resources</directory>  
  4.                 <includes>  
  5.                     <include>**/*.properties</include>  
  6.                     <include>**/*.xml</include>  
  7.                 </includes>  
  8.                 <filtering>false</filtering>  
  9.             </resource>  
  10.             <resource>  
  11.                 <directory>src/main/java</directory>  
  12.                 <includes>  
  13.                     <include>**/*.xml</include>  
  14.                 </includes>  
  15.                 <filtering>false</filtering>  
  16.             </resource>  
  17.         </resources>  


问题描述
今天在做项目时,遇到一个错误:“Result Maps collection already contains value for com.xxx.dao.tb_userMapper.BaseResultMap”
二、原因分析

    Mybatis-Generator在生成Mapper.xml文件时,会在原来基础上再生成,导致内容重复。

解决方法:删除多余的,或者重新生成




评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值