About the understanding of resource and target:

My compiler environment is 17, then I set the version of my source to 17, and the compiler will understand the syntax and features in the source code based on this version. If you are not sure what version of sdk my maven project will run on, and the backward compatibility of the jdk used to build Java, the higher the target, the better. If you are sure which version of SDK you want to run on, fill in the corresponding SDK version. You should also consider compatibility and fill in the form based on the overall situation.

 <properties>
     <maven.compiler.source>17</maven.compiler.source>
     <maven.compiler.target>21</maven.compiler.target>
 </properties>

Guess you like

Origin blog.csdn.net/m0_67574793/article/details/134562350