'When I am running in intellIj the same code is working properly but when running in eclipse with STS support I am gettinh below error
Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.example.repo.StudentRepo' available
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:351)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:342)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1172)
at com.example.demo.AddData.main(AddData.java:16)
Solution 1:[1]
When you are dealing with Spring Boot application you can always run it using maven or gradle for example : ./gradlew bootRun or ./mvnw spring-boot:run.
If it runs when you use those tools then everything is fine with your application and you probably make some mistake when you import it to your IDE.
It's hard to say what exacly wrong is with your config but try to check this post and see if you can find any differences to your configuration.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | k0staa |
