package com.example.spring; import org.springframework.context.support.ClassPathXmlApplicationContext; public class App { public static void main(String[] args) { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(new String[] { "classpath:META-INF/spring/applicationContext.xml",}); MathsUser mathsUser = ctx.getBean(MathsUser.class); mathsUser.doTask(); ctx.close(); } }