详细异常内容:
nested exception is java.lang.IllegalStateException: Could not evaluate condition on de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration due to org/springframework/boot/bind/RelaxedPropertyResolver not found. Make sure your own configuration does not rely on that class. This can also happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
博主 mybatis-plus 版本:3.1.2
网上大部分问题原因:
1.检查xml文件所在package名称
2.xxxDao的方法在xxxDao.xml中没有,然后执行xxxxDao的方法会报此xxxDao的方法返回值是List,而select元素没有正确配置ResultMap,或者只配置ResultType! 如果你确认没有以上问题,请任意修改下对应的xml文件,比如删除一个空行,保存.问题解决。
3.看下mapper的XML配置路径是否正确
( 不建议去有xml,毕竟 mybatis-plus为简化开发存在 )
问题原因:
- 官方解释 代码import问题
详细说明:
问题1:
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
@Service
public class DemoServiceImpl...
问题2:
import com.baomidou.mybatisplus.mapper.BaseMapper;
public interface DemoMapper extends BaseMapper<Demo> { ....
问题3:
import com.baomidou.mybatisplus.service.IService;
public interface DemoService extends IService<Demo> {......
解决办法,去除引入supper类内的包,更新为以下代码:
解决1:
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class DemoServiceImpl...
解决1:
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface DemoMapper extends BaseMapper<Demo> { ....
解决1:
import com.baomidou.mybatisplus.extension.service.IService;
public interface DemoService extends IService<Demo> {......
最后大家要注意,因为版本的升级需要修改默认method,例如:
selectOne 变更为: getOne
EntityWrapper 变更为: QueryWrapper
insert 变更为: save....