开发者社区 问答 正文

springboot整合ssm找不到pojo?报错

菜鸟提问,

整个项目用springboot整合ssm开发的,父工程是普通的maven项目和子工程没有依赖,子工程分别有dao,web,pojo,interface,service 用的springboot.

dao依赖pojo   ,interface依赖pojo  ,  service依赖dao interface, web依赖interface 

pojo install成功了,dao 和 interface  install的时候都找不到pojo,但是从mapper.interface(dao)和service.interface 引入的pojo类 那里都能点进对应的pojo.

也没有地方报错,就是install的时候报错

不是个别mapper找不到pojo 是全部都

整合后的application.properties里面都写什么百度看的写的都不太一样;到底写哪些,求大牛解答 谢谢

//dao install

[ERROR] /F:/develop2/ideaworkspace/parent/dao/src/main/java/com/mapper/dressMapper.java:[3,26] 程序包com.y.pojo不存在
[ERROR] /F:/develop2/ideaworkspace/parent/dao/src/main/java/com/mapper/dressMapper.java:[4,26] 程序包com.y.pojo不存在
[ERROR] /F:/develop2/ideaworkspace/parent/dao/src/main/java/com/mapper/dressMapper.java:[10,24] 找不到符号
  符号:   类 TbAddressExample
  位置: 接口 com.mapper.dressMapper


//interface install

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project pinyougou_sellergoods_interface: Compilation failure: Compilation failure:
[ERROR] /F:/develop2/ideaworkspace/parent/interface/src/main/java/com/service/Service.java:[3,26] 程序包com.y.pojo不存在
[ERROR] /F:/develop2/ideaworkspace/parent/interface/src/main/java/com/service/BrandService.java:[17,17] 找不到符号
[ERROR] 符号:   类 TbBrand
[ERROR] 位置: 接口 com.service.BrandService
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.

找不到

展开
收起
爱吃鱼的程序员 2020-06-06 15:21:24 1235 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
                        你把报错的类对应的代码和依赖的po贴上 
                    
    
                        <p>1.注解是否加上</p>
    

    2.是否配置扫描路径

                        <p>谢谢各位,已经解决了这个问题了,刚开始用不知道,只加载 启动的Application类项目的preproties,Application也需要注解</p>
    
                    
    
                        <p>你好  ,我也遇到了类似问题,请问具体怎么解决的</p>
                    
    
                        <p>注解扫描</p>
    
    2020-06-06 15:21:35
    赞同 展开评论