Access Spring Context from IntelliJ Platform Plugin SDK
Answered
I have a custom intellij plugin with an intellij @Service
where I would like to access the Spring Context of a running application in order to access certain beans of the org.springframework.boot.actuate
package.
For example, I want to 'inject' the HealthEndpoint
of the Spring Actuator and display the health status of the application.
How to approach that? Also there could be multiple applications running in the IDE, so how do I access an application in general? If you have any documentation links or ideas related to this, i would highly appreciate it.
@Service(Service.Level.PROJECT)
class SpringBootActuatorService {
// TODO: How to 'inject' the Spring Context of a running application in IntelliJ?
}
Please sign in to leave a comment.
What do you mean by “a running application”? A Spring application started from inside the IDE via run configuration?
In general, plugins cannot access anything outside the IDE process/classloader. Please explain your actual use case.