我收到编译错误:
com/mycompany/hibernate5/Main.java:[10,46] cannot find symbol
symbol: class Customer_
location: package com.mycompany.hibernate5.sakila.domain
com/mycompany/hibernate5/Main.java:[11,46] cannot find symbol
symbol: class Address_
location: package com.mycompany.hibernate5.sakila.domain
2 errors
但是,当我删除 mapstruct 注释处理器时,它编译得很好。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<!-- <configuration>
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
</annotationProcessorPaths>
</configuration>-->
</plugin>
所以我认为 mapstruct 在生成类之前正在扫描它们?有什么解决方案吗?