File: context.xml
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
File: Main.java
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Main {
public static void main(String[] args) throws Exception {
ApplicationContext ac = new ClassPathXmlApplicationContext(
"context.xml");
String[] beanNames = ac.getBeanDefinitionNames();
for (String beanName : beanNames) {
System.out.println(beanName + ": " + ac.getBean(beanName));
}
}
}
Spring-AspectFilter.zip( 4,453 k)