Autowiring fails: Not an managed Type

前端 未结 13 2065
清酒与你
清酒与你 2020-12-02 12:30

I have a big problem in my diploma project and would be very glad if you guys could help me! I made a Maven Multi Module Project and have 3 \"Core-projects\"

  • <
13条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-02 12:43

    You should extend the scope of the component-scan e.g. since you placed the entities in package at.naviclean.domain;

    This should help you to get rid the exeption: Not an managed type: class at.naviclean.domain.Kassa

    For further debugging you could try to dump the application context (see javadoc) to explore which classes have been detected by the component-scan if some are still no recognized check their annotation (@Service, @Component etc.)

    EDIT:

    You also need to add the classes to your persistence.xml

    
        at.naviclean.domain.Kassa
         ...
    
    

提交回复
热议问题