技术:java8
运行环境:IDEA 15.2 + jdk8 + windows 7
demo功能:提供一个 基本的 bean容器初始化dmeo
public static void main(String[] args) {
ApplicationContext context = new AnnotationConfigApplicationContext(Startup.class);
MessagePrinter printer = context.getBean(MessagePrinter.class);
printer.printMessage();
}
public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
((ClassPathXmlApplicationContext) context).refresh();
MessagePrinter printer = context.getBean(MessagePrinter.class);
printer.printMessage();
}
自己下载源代码测试下
欢迎添加微信,互相学习↑↑↑ -_-
白老虎
programming is not only to solve problems, ways to think
grafana 级连 菜单 templating (variables) 配置
rocketmq 集群搭建 (2master + 2slave + 2namesrv)
AI 机器人 抓取 微信 聊天中的 百度网盘 分享地址和密码