简体   繁体   中英

How can I update the default version of Spring that Intellij provides?

When I create a Spring project in IntelliJ IDEA, it suggests I use Spring 4.1.6. I want to use 4.2.1 (which I can do after creating the project).

在此处输入图片说明

Where can I make the change?

Thanks, Andy

I don't know if you can change that yourself without an upgrade but you can allow it to create it with that version then manually change it your pom.xml file.

For example,

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>4.2.1.RELEASE</version>
</dependency>

You can also provide a property that an be used on all your Spring dependencies and then you only have to change it one place.

For example,

<properties>
    <org.springframework.version>4.2.0.RELEASE</org.springframework.version>
    ...
</properties>

Then use it like...

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>${org.springframework.version}</version>
</dependency>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM