Search code examples
spring-bootconfigurationmicroservicesspring-tool-suitegit-clone

Spring Boot application is not running in STS with profiles due to Run Configuration is not showing Project names in Drop Down to be selected


Need some help in running Spring Boot Application, I have cloned a Microservice and Imported into Eclipse. Now I want to run this as spring boot application in my STS(4.10.0 version). While running I need to supply profile. For this I am setting up configuration (Run Configuration). Steps :

  1. Right click on Project
  2. Select Run As > Run Configurations
  3. Select "Spring Boot App" -> Click to Add new Configurations
  4. Here I am unable to select Project, it is not displayed in drop down. Below is screenshot enter image description here

Note : I tried Importing Project as "Maven Project", "Existing project Into Workspace" and Git project into workspace. All these 3 ways are not working for me

Need help


Solution

  • This looks like your project is not recognized as a Spring Boot application. Without looking at your project it is hard to say why the IDE doesn't identify your project as a Spring Boot project. Does that work when you create a new Spring Boot project using the Spring wizards? Also feel free to share a link to your project, we would be happy to take a deeper look.

    As a workaround, you can always start your Spring Boot application as a regular Java Application using the "Run as Java Application" in the IDE. That way you would have to set the active profiles via a system property in your launch config.