随笔分类 - Java - Sping Mvc\Boot
摘要:1. HelloWorld 步骤: 加入 jar 包 mons logging 1.1.3.jar spring aop 4.0.0.RELEASE.jar spring beans 4.0.0.RELEASE.jar spring context 4.0.0.RELEASE.jar spring
阅读全文
摘要:Spring Boot项目使用一个全局的配置文件application.properties或者是application.yml,在resources目录下或者类路径下的/config下,一般我们放到resources下。 xlsx =================================
阅读全文
摘要:1.编写SpringConfig 用于实例化Spring容器 @Configuration //通过该注解来表明该类是一个Spring的配置,相当于一个 文件 @Bean // 通过该注解来表明是一个Bean对象,相当于xml中的`` 2.读取外部文件 通过@PropertySource可以指定读取
阅读全文