无法在春季启动中使字段私有错误



我正在尝试克隆此项目Repos它给了我这个错误java:java.lang.ExceptionInInitializerError无法使字段专用com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors.com.sun.tools.javac.processing.JavacProcessingEnvironment.discoveredProcs可访问:模块jdk.compiler不"打开com.sun.tools.javac.processing";至未命名模块@27119bf

我正在学习本课程这是我的POM.XML

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.github.sfg-beer-works</groupId>
<artifactId>sfg-beer-works-bom</artifactId>
<version>1.0.4</version>
</parent>
<!--    <groupId>sfg.brewery</groupId>-->
<artifactId>brewery-monolith</artifactId>
<version>1.0-SNAPSHOT</version>
<description>SFG Brewery Monolith UI</description>
<name>SFG Brewery Monolith UI</name>
<licenses>
<license>
<name>GNU General Public License v3.0</name>
<url>https://www.gnu.org/licenses/gpl.txt</url>
</license>
</licenses>
<organization>
<name>Spring Framework Guru</name>
</organization>
<developers>
<developer>
<name>John Thompson</name>
<organization>Spring Framework Guru</organization>
</developer>
</developers>

<properties>
<!-- Web dependencies -->
<webjars-bootstrap.version>3.3.6</webjars-bootstrap.version>
<webjars-jquery-ui.version>1.12.1</webjars-jquery-ui.version>
<webjars-jquery.version>3.3.0</webjars-jquery.version>
<wro4j.version>1.8.0</wro4j.version>
<!--set this to your docker acct name-->
<docker.image.prefix>sfgbeerworks</docker.image.prefix>
<!--Set to name of project-->
<docker.image.name>${artifactId}</docker.image.name>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
</dependency>
<!-- webjars -->
<dependency>
<groupId>org.webjars</groupId>
<artifactId>webjars-locator-core</artifactId>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>${webjars-jquery.version}</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery-ui</artifactId>
<version>${webjars-jquery-ui.version}</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>${webjars-bootstrap.version}</version>
</dependency>
<!-- end of webjars -->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>ro.isdc.wro4j</groupId>
<artifactId>wro4j-maven-plugin</artifactId>
<version>${wro4j.version}</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<configuration>
<wroManagerFactory>ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory
</wroManagerFactory>
<cssDestinationFolder>${project.build.directory}/classes/static/resources/css</cssDestinationFolder>
<wroFile>${basedir}/src/main/wro/wro.xml</wroFile>
<extraConfigFile>${basedir}/src/main/wro/wro.properties</extraConfigFile>
<contextFolder>${basedir}/src/main/less</contextFolder>
</configuration>
<dependencies>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>${webjars-bootstrap.version}</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.23.0</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${org.projectlombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<!--<dockerHost>http://127.0.0.1:2375</dockerHost>-->
<dockerHost>unix:///var/run/docker.sock</dockerHost>
<verbose>true</verbose>
<images>
<image>
<name>${docker.image.prefix}/${docker.image.name}</name>
<alias>brewery-ui</alias>
<build>
<!--copies artifact to docker build dir in target-->
<assembly>
<descriptorRef>artifact</descriptorRef>
</assembly>
<dockerFile>Dockerfile</dockerFile>
<tags>
<tag>latest</tag>
<tag>${project.version}</tag>
</tags>
</build>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>
</project>```

我通过更改java版本解决了这个问题。

最新更新