java解决springboot其他类注入Service、Mapper对象为Null
java解决springboot其他类注入Service、Mapper对象为Null具体错误:实现CommandLineRunner接口可以解决注入的Service、Mapper对象为空,CommandLineRunner主要的作用是预加载数据,运行主启动类时此方法会自动加载并运行,具体操作如下:package com.xcz.config;import com.xcz.entity.User;import com.xcz.service.UserService;...
原创
2021-08-24 19:00:32 ·
3050 阅读 ·
0 评论