spring-boot 启动时候 出现异常:The bean 'xxx' could not be injected as a 'xx.xxxx' because it is a JDK dynami
-
-
private UmsUserMapper userMapper;
如上代码会报错,这是因为程序中有一个UserMapper,所以当命名为userMapper会首先查找UserMapper这个类而不是UmsUserMapper这个类,改成umsUserMapper程序正常。注入时的变量命名很重要