Mahmudul Islam

Greenhorn
+ Follow
since May 29, 2017
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mahmudul Islam

Sorry, there was a typo and I couldn't find it at first. Anyway problem is solved.
6 years ago
Hello There, I am new to this forum. It's great to be here.
Anyway. I was practicing Spring framework Annotation Configuration using XML. I have a repository, a service and a main app. There is an implementation of repository (named "customerRepository") and service (named "customerService") and the But the problem is when I ran the main app it shows "NoSuchBeanDefinitionException" exception. But I think I have done all the things right way and service and repository Autowired correctly. But it still not working. Please guide me if I am wrong at any point. I am using java 8, and app configured using maven.
Here is the error:
Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'customerService' available
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:687)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1207)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1087)
at Application.main(Application.java:16)

Here is the code:
Implemented classes>>



6 years ago