Faster Spring Boot with IntelliJ IDEA 14.1

Posted on by Yann Cébron

In the IntelliJ IDEA 14.1 EAP announcement we’ve already teased you with the expected support for Spring Boot into the IDE. Today the time has come to share more details on what it is and what you already can try with the latest EAP build.

Creating New Projects

First of all, IntelliJ IDEA now lets you quickly create new projects using Spring Initializr right from the Project Wizard, where you can create ready-to-run applications with just few clicks:

spring-boot-initialzr

Editing Application Configuration Files

Now you get thee advanced coding assistance for editing your application configuration which includes smart code completion, error highlighting, navigation, and quick fixes:

spring-boot-application-properties

If you add the application properties files to your Spring facet, they will be automatically validated on Make in case the Compiler → Validation → Spring Model option is selected.

If you try renaming any Spring profile from its usage, IntelliJ IDEA will automatically apply corresponding changes to profile-specific configuration files:

spring-boot-rename-profile

Running Spring Boot Applications

And finally, to give you the complete control over Spring Boot applications, we’ve added a brand new dedicated Run Configuration that lets you quickly override Spring Boot settings and application configuration properties (more coming soon, please see issue for details.)

spring-boot-run-configuration

That’s all for now, we hope you’ll enjoy developing Spring Boot applications with IntelliJ IDEA, and are eager to hear your feedback. You can vote up existing issues in our tracker, create new ones, or post to the discussion forum for that.

Develop with Pleasure!

Comments below can no longer be edited.

41 Responses to Faster Spring Boot with IntelliJ IDEA 14.1

  1. Romaric Philogene says:

    March 4, 2015

    There is no Neo4J template ? 🙂

    • Yann Cébron says:

      March 4, 2015

      This is because there currently exists no starter for neo4j.

  2. Clint Checketts says:

    March 5, 2015

    I love seeing Spring Boot get such excellent support in IntelliJ IDEA.

    Any idea why Java Config Spring MVC wouldn’t be working? I tried it in the 14.1 EAP and it still appears completely broken. (As in nothing populates the Spring Tool window)

    Ticket: https://youtrack.jetbrains.com/issue/IDEA-132197 (looks like it was incorrectly closed as a dupe)

    • Yann Cébron says:

      March 5, 2015

      The Spring MVC toolwindow not containing content is just the result of not supporting Java Config Based MVC web apps (yet).

      • Clint Checketts says:

        March 5, 2015

        Is there a YouTrack ticket I could watch for that purpose? It is common for me and teammates to get lost looking for the an endpoint while my Eclipse teammates mock us. 😉

        We switched from Jax-rs to Spring MVC and miss the utility of the ‘Java Enterprise’ Tool Window.

  3. Javad says:

    March 7, 2015

    I am really excited to see IntelliJ IDEA supports Spring-Boot, the sad news for me is I couldn’t configure my current Spring Boot project into IntelliJ IDEA 🙁
    I’ve added Spring facet bu nothing more. Am I doing something wrong or this is an issue?
    Anybody was able to use this new feature?

    • Yann Cébron says:

      March 7, 2015

      Spring Boot model setup/support is coming yet.

      • Eric says:

        June 11, 2015

        Any ETA as to of when this support is comming?

        • Yann Cébron says:

          June 13, 2015

          Very soon in IntelliJ IDEA 15 Early Access Program.

    • Sean says:

      August 12, 2015

      If you create the spring boot application through the start.spring.io website, or create it manually with maven (or gradle), you can just open the project with maven (gradle) support and use the configurations to create the project and set it up correctly. If you have groovy or groovy-all in your maven config that should enable groovy, but you can also right click on the application in the project viewer and select add framework support. Then you can select the groovy language. If you don’t have the groovy compiler, you can just install that from groovy-lang, but the import from maven should be enough. I use to experience this issue, so I hope this saves you some of the pain I went through

  4. Michal says:

    March 14, 2015

    Hi,
    Will it support yaml format?

  5. James L says:

    March 25, 2015

    Is there support for generating a Scala-based Spring Boot project, or does this have to be done manually?

    • Yann Cébron says:

      March 25, 2015

      Support for other languages has to be provided by the corresponding Initializr Service.

    • Sean says:

      August 12, 2015

      Make sure you have the scala plugin installed so intellij understands how to use the language features. Then if you follow the spring-scala project, just create the project and import it into intellij. you can also just add scala support and create scala classes. I have done this with a few jvm languages, even including jruby and it works nicely. You may just have to make sure that the files are compiled. When I was using jruby, that was a bigger obstacle than scala, especially using the classes in java files. Scala is a lot nicer to interact with and provides easy cross support.

  6. Gary Kennedy says:

    March 30, 2015

    What about adding camel dependency support? 🙂

    • Yann Cébron says:

      March 31, 2015

      This would have to be provided by the corresponding Initializr Service.

  7. Ivan says:

    May 11, 2015

    How do I configure Intellij so my Spring Boot can be deployed on external server , say JBoss, Glassfish or WebLogic?

    • Yann Cébron says:

      May 11, 2015

      Please see https://www.jetbrains.com/idea/help/configuring-web-application-deployment.html and related topics for handling this using IntelliJ IDEA’s builtin mechanisms.

      • zebrum says:

        August 11, 2017

        Don’t use IntelliJ IDEA’s builtin mechanisms for this it would be almost impossible to get a valid WAR. Spring Initializr uses Maven so in pom.xml change the packaging to war, then open the Maven Projects window and under Lifecycle run the package step and it automatically includes all of the spring jars saving a lot of effort. I believe you also need to change from a SpringBoot main to a Tomcat one.

    • Sean says:

      August 12, 2015

      If you are using maven, make sure you change the packaging type to war, and follow any additional spring boot configurations necessary. Then you can create an artifact of type war. Make sure you include your external server in intellij. If you need screen shots or any help, I can provide those. Then when you launch, make sure your launch configurations are set the same as if you were launching a non spring boot application( or a regular webapp ). And that is if you decide not to use the maven or gradle launch options from the command-line. The nice thing about spring boot is, you can easily make an executable war that will also use an embedded web container or deploy to a standalone container.

      If all else fails, you can easily create a war deployment and use ant with the jar dependency for ssh or ftp to remote deploy to your test environment. and that is if you don’t want to go through your application loader for your container with ant. That is also possible.

  8. Bryce Griner says:

    May 28, 2015

    Not sure what I’m missing, but I just downloaded the latest version of Intellij 14 EAP and I don’t see any Spring Boot functionality when I create a new project. I saw that a Spring Boot plugin was installed, but I don’t see where it can be used.

    Software: Mac OS X 10.9.5
    Processor: 2.7 GHz Intel Core i7

    Build: IU-141-1192 Built May 19, 2015

    • Yann Cébron says:

      May 29, 2015

      All the features mentioned in this blog post should be available, Spring Boot applications can be created using “Spring Initializr” project category in wizard.

  9. harold says:

    June 21, 2015

    I added the application.properties to my Spring boot project (Creating it following you steps above) and Intellij is not picking up the applicaiton.properties file. I actually like using the application.yml file since I can config my profile setup all in one file and really hope intellij works with this! However how do I add this to the Spring Faucet? Im confused here:

    If you add the application properties files to your Spring facet, they will be automatically validated on Make in case the Compiler → Validation → Spring Model option is selected.

    Thanks for the help!

    • Yann Cébron says:

      June 22, 2015

      Check out next version of 15 EAP, it will support (automatic) adding of application.yml as well as validation on Make.

      • harold says:

        June 23, 2015

        Im still curious as to what Im missing for the auto complete feature with the application.properties thought :/ ….I am using the latest release of Intellij and also using the latest Spring Boot build. There must be something I’m missing in an Intellij setting.

  10. Chris Mousset says:

    July 7, 2015

    Is it possible to make the spring configuration check add all @Configuration classes automatically? This is a manual action now.

    • Yann Cébron says:

      July 7, 2015

      This is available in version 15, currently in EAP (free) https://confluence.jetbrains.com/display/IDEADEV/IDEA+15+EAP

    • Sean says:

      August 12, 2015

      Make sure you have component scan on and the configuration files are in the same package, or in a sub package where you declared component scan. When I had this problem, the mistake I made was configuring component scan, then having a package that was parallel, not as a sub package to where I declared component scan. If you want to have the packages parallel, then make sure you include base packages in the component scan annotation and provide a path to the top level packages where the configurations are

  11. Khoi Nguyen says:

    November 5, 2015

    I used to run spring boot application via maven command, and with springloaded artifact to reload all changes. Now I know spring-boot plugin on intellij, however I don’t know how to hotswap the change without restart server

  12. DaShaun says:

    December 7, 2015

    This makes me smile!

  13. Hiren says:

    January 31, 2016

    in intellij idea i create spring boot application using above step after that i do not have option for creating java file in right click of java folder ->new

    • Yann Cébron says:

      February 1, 2016

      Did you import the Maven/Gradle project? Otherwise source roots are not detected.

      • Hiren says:

        February 8, 2016

        thank you. its working..

  14. Using Spring Boot JPA to Access MySQL Data – Recursive Chaos says:

    June 12, 2016

    […] a ZIP file you can open in your IDE of choice, or you can use generators built into IDEs such as IntelliJ or the Spring Tool Suite plugin for Eclipse. Be sure to add the ‘JPA’ and […]

  15. jeune motarde says:

    February 24, 2017

    There is no Neo4J ????

Subscribe

Subscribe for updates