Java Configuration - NoSuchBeanDefinitionException: No unique bean of type
I would like to test the Java Configuration with a small test case, but it throws error

<b>
org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.mycompany.MavenVaadinSpring.service.UserManager] is defined: 
</b>

*My question is that, what did I wrong ?*

**see the code below**

AppConfigTest.java

     public class AppConfigTest {
	
	public static void main(String[] args) {
		JavaConfigApplicationContext context = new JavaConfigApplicationContext(AppConfig.class);
		UserManager userManager = context.getBean(UserManager.class);
	}
    }

AppConfig.java

    @Configuration
    @ResourceBundles("classpath:jdbc-myql")
    public abstract class AppConfig {
    	
	@Bean
	public BasicDataSource dataSource() {
		BasicDataSource basicDataSource = new BasicDataSource();		
		return basicDataSource;
	}

	@Bean
	public UserDao userDao() {
		UserDao UDI = new UserDaoImpl();
		UDI.setDataSource(dataSource());
		
		return UDI;
	}

	@Bean
	public UserManager userManager() {
		UserManager UM = new UserManagerImpl();
		UM.setUserDao(userDao());
		
		return UM;
	}

	abstract @ExternalValue("jdbc.url") String url();
	abstract @ExternalValue("jdbc.username") String username();
	abstract @ExternalValue("jdbc.password") String password();
	abstract @ExternalValue("jdbc.jdbc.driverClassName") String classname();	
    }


    Exception in thread "main"   org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type   [com.mycompany.MavenVaadinSpring.service.UserManager] is defined: 
	at org.springframework.config.java.context.TypeSafeBeanFactoryUtils.getBean(TypeSafeBeanFactoryUtils.java:46)
	at org.springframework.config.java.context.JavaConfigApplicationContext.getBean(JavaConfigApplicationContext.java:378)
	at com.mycompany.MavenVaadinSpring.AppConfigTest.main(AppConfigTest.java:11)

Java Configuration - NoSuchBeanDefinitionException: No unique bean of type
===

I would like to test the Java Configuration with a small test case, but it throws error

<b>
org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.mycompany.MavenVaadinSpring.service.UserManager] is defined: 
</b>

*My question is that, what did I wrong ?*

**see the code below**

AppConfigTest.java

     public class AppConfigTest {
	
	public static void main(String[] args) {
		JavaConfigApplicationContext context = new JavaConfigApplicationContext(AppConfig.class);
		UserManager userManager = context.getBean(UserManager.class);
	}
    }

AppConfig.java

    @Configuration
    @ResourceBundles("classpath:jdbc-myql")
    public abstract class AppConfig {
    	
	@Bean
	public BasicDataSource dataSource() {
		BasicDataSource basicDataSource = new BasicDataSource();		
		return basicDataSource;
	}

	@Bean
	public UserDao userDao() {
		UserDao UDI = new UserDaoImpl();
		UDI.setDataSource(dataSource());
		
		return UDI;
	}

	@Bean
	public UserManager userManager() {
		UserManager UM = new UserManagerImpl();
		UM.setUserDao(userDao());
		
		return UM;
	}

	abstract @ExternalValue("jdbc.url") String url();
	abstract @ExternalValue("jdbc.username") String username();
	abstract @ExternalValue("jdbc.password") String password();
	abstract @ExternalValue("jdbc.jdbc.driverClassName") String classname();	
    }


    Exception in thread "main"   org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type   [com.mycompany.MavenVaadinSpring.service.UserManager] is defined: 
	at org.springframework.config.java.context.TypeSafeBeanFactoryUtils.getBean(TypeSafeBeanFactoryUtils.java:46)
	at org.springframework.config.java.context.JavaConfigApplicationContext.getBean(JavaConfigApplicationContext.java:378)
	at com.mycompany.MavenVaadinSpring.AppConfigTest.main(AppConfigTest.java:11)
