Loading...
使用JetBrains DataGrip 2019.1.4 x64连接mysql的时候报错如下:Connection to @localhost fail...
用于创建对象的注解相当于:<bean id="" class="">1.1@Component注解作用...
ApplicationContext ac = new AnnotationConfigApplicationContext(SpringConfigur...
作用:用于导入其他配置类,在引入其他配置类时,可以不用再写@Configuration 注解。不过,写上也可以。属性:value[]:用于指定其他配置类的...
作用:用于指定 spring 在初始化容器时要扫描的包。作用和在 spring 的 xml 配置文件中的:<context:component-sc...
@Configuration作用:用于指定当前类是一个 spring 配置类,当创建容器时会从该类上加载注解。获取容器时需要使用AnnotationApp...
指定包扫描,主要扫描该包下@Controller @Service @Respsitory @Component四个注解@ComponentScan(va...