Hi everyone, welcome to the March update for Visual Studio Code for Java! In this blog we are going to share several new Spring Boot features as well as testing coverage updates, so let’s get started!
Spring Boot Feature Updates
New Refactoring Preview available for version upgrades
The feature to automatically upgrade your projects to the latest Spring Boot version now allows you to choose between applying those changes directly to your project or previewing them in a refactoring preview. The refactoring preview gives you an exact diff for all the changes that the automated version upgrade process produced and allows you to select which changes to apply and which not. Please note that currently all changes are unchecked, so you need to select the changes you want to apply manually.
To refactor Spring Boot projects or upgrade Spring Boot projects to a newer version, you can directly right click on the POM.xml in your Spring Projects in Visual Studio Code, and click on “Refactor Spring Boot projects” or “Upgrade Spring Boot projects“, here’s how to do it.
You can also watch this short video for the full demonstration of all the features.
Changing Log Levels on the fly
The Spring Tools in Visual Studio Code show live information from a running Spring Boot application if you have actuators on the project classpath and start your app from within Visual Studio Code. The latest update adds viewing and changing log levels to this. A command in the palette (>Spring Boot: Set Log Levels) lets you select the running Spring Boot application, search through the list of active log levels, and allows you to change them directly within the running application. The change is effective in the running application only. The next time you start your app, the default log level settings are back.