idea maven打包错误

it2024-12-29  10

一:idea language level 总是变成springboot 默认5时,

打包错误:-source 1.5 中不支持 diamond 运算符

plugin添加指定版本配置,如下

二:idea maven 打包报如下错误

Caused by: org.yaml.snakeyaml.scanner.ScannerException: while scanning for the next token found character '@' that cannot start any token. (Do not use @ for indentation) in 'reader', line 7, column 13: active: @activatedProperties@

plugin添加配置,如下 注:当打包不报如上错误,启动项目主类时同样报此错,添加以下依赖

<dependency> <groupId>org.yaml</groupId> <artifactId>snakeyaml</artifactId> <version>your-version</version> </dependency>

**

END 完整配置:

<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins> <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> </resources> </build>
最新回复(0)