additional steps to refine first walkthrough for VS Code getting started page

This commit is contained in:
Martin Lippert
2021-05-30 19:05:07 +02:00
parent b2ebc43bc0
commit 14ff7a53e9
3 changed files with 41 additions and 0 deletions

View File

@@ -56,6 +56,24 @@
"image": "walkthroughs/spring-symbols-navigation.png",
"altText": "Go to Symbol in Workspace..."
}
},
{
"id": "run-your-spring-projects",
"title": "Run your Spring Boot projects",
"description": "Running your Spring Boot projects from within VS Code is simple: Open any Java source file from your project and press `Run` at the top right corner.\nThe second option is to [switch to the launch section](command:workbench.view.debug) of VS Code and start the app there.",
"media": {
"image": "walkthroughs/spring-run-app.png",
"altText": "Run your Spring Boot app"
}
},
{
"id": "live-information-for-your-running-spring-app",
"title": "Show live information from your running Spring Boot application",
"description": "A unique feature of the Spring Tools is the ability to vizualize live data from your running app inplace with the source code of the running application.\n",
"media": {
"markdown": "walkthroughs/live-information.md",
"altText": "Run your Spring Boot app"
}
}
]
}

View File

@@ -0,0 +1,23 @@
## Look inside of your running Spring Boot application
Spring Tools 4 can display live metadata information of a running Spring Boot application direclty in place in the source code.
### Configure the launch config
The live information is provided by [Spring Boot Actuators](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#actuator), so you need to have he Spring Boot Actuator module on the classpath of your project. In addition to that the information is exchanged between the running app and the tools via JMX, so you need to enable JMX for your app. This can be done by adding a specific JVM argument to the [launch configuration](command:workbench.action.debug.configure):
`"vmArgs": "-Dspring.jmx.enabled=true"`
### Show the live information
In order to connect to a running application, you need to execute the [Manage Live Spring Boot Process Connections](vscode-spring-boot.live-hover.connect) command (e.g. via the command palette). Then, the command shows up a list of running processes, from which you can select the app to connect to.
Once connected, the live information shows up in place with the source code of your application.
![](https://spring.io/images/tools-img4-4257680a0b50b006044ef88d7234ca92.jpg)
### Update and disconnect
If you have VS Code connected to a running app, you can execute the same command again to refresh the information or to disconnect from the running app again. The quick pick choices will show you up with those options for connected processes.

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB