项目结构:

server模块引用shiro模块中的实体类,server中的controller代码:

@RestController
public class ApiController {

    @PostMapping("/api")
    public String sdc(){
        Rfgcgl yhmc = new Rfgcgl().selectOne(new QueryWrapper<Rfgcgl>().eq("YHMC", "系统管理"));
        return yhmc.toString();
    }

}

 解决方案:在启动类上添加注解,同时扫描server和shiro下的mapper文件即可。

@MapperScan(basePackages = {"com.server.mapper","com.shiro.mapper"})

 

相关文章:

  • 2021-10-20
  • 2022-12-23
  • 2021-07-20
  • 2021-12-06
  • 2021-11-06
  • 2021-07-26
  • 2021-12-16
  • 2022-03-07
猜你喜欢
  • 2021-04-16
  • 2022-03-01
  • 2021-11-18
  • 2021-11-18
  • 2021-11-17
  • 2021-05-09
相关资源
相似解决方案