Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.26</version>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

为了提高可维护性并方便版本管理,建议将依赖项的版本号提取到 <properties> 标签中进行统一管理。这有助于确保版本一致性,并简化未来的升级过程。

例如,您可以在 <properties> 中定义 lombok.version,然后在此处引用它:

<properties>
    <maven.compiler.source>8</maven.compiler.source>
    <maven.compiler.target>8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <lombok.version>1.18.26</lombok.version>
    ...
</properties>

然后,此处的版本标签可以更新为使用该属性。对其他依赖项(如 junitslf4jokhttp 等)也推荐采用此方式。

Suggested change
<version>1.18.26</version>
<version>${lombok.version}</version>

<scope>compile</scope>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down