将包名com.....rest,改为com.....gateway,在对应的yml中也做了修改,再启动就提示找DbValidator找不到usermapper
来源:4-3 用户服务与网关交互

王謀
2018-09-19
启动提示:Field userMapper in com.stylefeng.guns.gateway.modular.auth.validator.impl.DbValidator required a bean of type ‘com.stylefeng.guns.gateway.common.persistence.dao.UserMapper’ that could not be found.
Action: Consider defining a bean of type ‘com.stylefeng.guns.gateway.common.persistence.dao.UserMapper’ in your configuration.
写回答
2回答
-
jackspan
2018-11-25
config下MybatisPlusConfig类的注解要改成 @MapperScan(basePackages = {"com.stylefeng.guns.gateway.*.dao", "com.stylefeng.guns.gateway.common.persistence.dao"})
00 -
Allen
2018-09-19
哦 就是你直接改了rest那个工程 变成gateway工程,然后修改了相应的配置文件是吧
052019-07-31
相似问题