Spring MVC 注解和XML的区别

2025-05-05 05:07:51
推荐回答(1个)
回答1:

java代码:
package cn.javass.spring.chapter12;
//省略import
public class ComponentDefinitionWithAnnotationTest {
private static String configLocation = "classpath:chapter12/componentDefinitionWithAnnotation.xml";
private static ApplicationContext ctx = new ClassPathXmlApplicationContext(configLocation);
@Test