Intellij Idea IntelliJ上的pom.xml中不允许使用SpringBoot annotationProcessorPaths

xriantvc  于 2023-04-05  发布在  Spring
关注(0)|答案(1)|浏览(547)

我正在尝试设置mapstruct处理插件,IntelliJ正在突出显示annotationProcessorPaths,它说这里不允许。

<plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>11</source>
                    <target>11</target>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.mapstruct</groupId>
                            <artifactId>mapstruct-processor</artifactId>
                            <version>1.4.2.Final</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
        </plugins>

    </build>```
tkclm6bt

tkclm6bt1#

您可以对pom.xml进行以下更改

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>11</source>
                <target>11</target>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.mapstruct</groupId>
                    <artifactId>mapstruct-processor</artifactId>
                    <version>1.4.2.Final</version>
                </dependency>
            </dependencies>
        </plugin>
    </plugins>
</build>```

相关问题