1.kibana的安装与连接:
关于@Configeriation和@Component区别
【重要区别】
@Component:会当做配置类,但不会为其生成CGLIB代理class
@Configuration:会当做配置类,但会为其生成CGLIB代理class
在获取当前类名时,使用@Component获取的是当前类名;而@Configuration获取的是当前类名+唯一标识(CGLIB代理)
@RunnerWith的作用
Springboot的@RunWith(SpringRunner.class)
注解的意义在于Test测试类要使用注入的类,比如@Autowired注入的类,
有了@RunWith(SpringRunner.class)这些类才能实例化到spring容器中,自动注入才能生效,
不然直接一个NullPointerExecption