摘要: 一、Spring提供了多种上下文来实现容器功能 比如:AnnotationConfigApplicationContext、ClassPathXmlApplicationContext 这里使用AnnotationConfigApplicationContext分析,代码如下: 二、Spring在调 阅读全文
posted @ 2022-08-21 15:45 雷雨客 阅读(189) 评论(0) 推荐(0)
摘要: 1、java中静态成员变量与静态块会比构造函数先执行,并且只会执行一次 2、一个类中有多个static修饰的成员变量或者代码块,会按照代码中先后的顺序执行 请看下面的示例: public class Test { public static void main(String[] args) { Ou 阅读全文
posted @ 2022-08-21 11:59 雷雨客 阅读(1035) 评论(0) 推荐(0)