Am trying to load bean.xml file but am getting following error
ApplicationContext context = new ClassPathXmlApplicationContext("bean.xml");
bean.xml file present in src/main/resources folder
provide any solution ASAP..
Views
Replies
Total Likes
THIS API (org.springframework.context.ApplicationContxt) is not an AEM API.
Looks like you are attempting to use Spring MVC API in AEM.
To develop in AEM - you should use Sling APIs, OSGi, etc, See this article as a guideline on how to develop against AEM:
Views
Replies
Total Likes
I have dependency on external customized jar so i have to use ApplicationContext to load bean.xml
is there any solution ?
because which is working in eclipse but not in AEM server .
Views
Replies
Total Likes
The reason it's not working is that you are attempting to use AEM as if its a Spring-based platform.
ApplicationContext is a Spring API: Understanding application-context
As discussed in the WEEKEND tutorial - an AEM site is implemented using:
Not Spring APIs.
I also know SPRING MVC and how it works with Controllers, Views, and Models and annotations like @autowired. AEM uses none of these.
AEM uses OSGi based R6, R7 annotations (like @Reference) : Using OSGi R6 annotations (>= AEM6.2) - Experience Delivers
Views
Replies
Total Likes
Views
Likes
Replies