diff --git a/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/nosuchbeandefinitionexception/BeanA.java b/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/nosuchbeandefinitionexception/BeanA.java new file mode 100644 index 0000000000..21d7007917 --- /dev/null +++ b/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/nosuchbeandefinitionexception/BeanA.java @@ -0,0 +1,12 @@ +package com.baeldung.springbootmvc.nosuchbeandefinitionexception; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +@Component +public class BeanA { + + @Autowired + BeanB dependency; + +} \ No newline at end of file diff --git a/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/nosuchbeandefinitionexception/BeanB.java b/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/nosuchbeandefinitionexception/BeanB.java new file mode 100644 index 0000000000..3dd72aacc6 --- /dev/null +++ b/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/nosuchbeandefinitionexception/BeanB.java @@ -0,0 +1,5 @@ +package com.baeldung.springbootmvc.nosuchbeandefinitionexception; + +public class BeanB { + +} diff --git a/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/nosuchbeandefinitionexception/NoSuchBeanDefinitionDemoApp.java b/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/nosuchbeandefinitionexception/NoSuchBeanDefinitionDemoApp.java new file mode 100644 index 0000000000..01d19437c5 --- /dev/null +++ b/spring-boot-mvc/src/main/java/com/baeldung/springbootmvc/nosuchbeandefinitionexception/NoSuchBeanDefinitionDemoApp.java @@ -0,0 +1,12 @@ +package com.baeldung.springbootmvc.nosuchbeandefinitionexception; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class NoSuchBeanDefinitionDemoApp { + + public static void main(String[] args) { + SpringApplication.run(NoSuchBeanDefinitionDemoApp.class, args); + } +}