Merge pull request #5246 from dkapil/task/BAEL-8964

BAEL-8964 Add a section in "NoSuchBeanDefinition" article
This commit is contained in:
Loredana Crusoveanu 2018-09-13 22:46:36 +03:00 committed by GitHub
commit aef7b7f9aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 0 deletions

View File

@ -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;
}

View File

@ -0,0 +1,5 @@
package com.baeldung.springbootmvc.nosuchbeandefinitionexception;
public class BeanB {
}

View File

@ -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);
}
}