摘要: 优点:可以加快程序启动速度 缺点:配置错误的Bean在启动时不会被发现 默认:关闭 开启方法1.:pringApplicationBuilder的lazyInitialization方法 开启方法2:SpringApplication的setLazyInitialization方法 开启方法3:sp 阅读全文
posted @ 2020-07-25 17:09 阿布都日 阅读(160) 评论(0) 推荐(0)
摘要: springboot会提供FailureAnalyzer来提供失败原因和解决方案如果springboot未能提供此信息,可以把debug设置为true来获取调试信息 阅读全文
posted @ 2020-07-25 16:59 阿布都日 阅读(167) 评论(0) 推荐(0)
摘要: spring.main.log-startup-info=true 可以继承SpringApplication类并实现logStartupInfo来记录其他日志信息 @SpringBootApplication public class MeraspringApplication { public 阅读全文
posted @ 2020-07-25 16:54 阿布都日 阅读(252) 评论(0) 推荐(0)
摘要: [annotations] @ComponentScan @ConfigurationPropertiesScan @EntityScan @SpringBootApplication @Entity @EnableAutoConfiguration @Configuration @Import @ 阅读全文
posted @ 2020-07-25 16:15 阿布都日 阅读(156) 评论(0) 推荐(0)
摘要: #检查java版本,java版本要大于等于1.8 java -version #忽略cli,maven的安装 #maven命令: mvn package:在当前目录创建pom.xml文件执行此命令就会创建一个maven项目 <?xml version="1.0" encoding="UTF-8"?> 阅读全文
posted @ 2020-07-25 14:14 阿布都日 阅读(129) 评论(0) 推荐(0)
摘要: //引入命名空间 xmlns:th="http://www.thymeleaf.org" //用th:<prop>替换<prop>属性的值 <h4 th:text="${hello}" ></h4> 1 Fragment inclusion th:insert th:replace 2 Fragme 阅读全文
posted @ 2020-07-25 11:41 阿布都日 阅读(208) 评论(0) 推荐(0)
摘要: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> 阅读全文
posted @ 2020-07-25 11:02 阿布都日 阅读(94) 评论(0) 推荐(0)
摘要: 1. JSP 2. Velocity 3. Freemarker 4. Thymeleaf 阅读全文
posted @ 2020-07-25 10:20 阿布都日 阅读(69) 评论(0) 推荐(0)
摘要: <dependency> <groupId>org.webjars</groupId> <artifactId>jquery</artifactId> <version>3.5.1</version> </dependency> 阅读全文
posted @ 2020-07-25 10:03 阿布都日 阅读(59) 评论(0) 推荐(0)
摘要: springboot的静态资源加载是通过WebMvcAutoConfiguration类实现的,下面的方法是加载资源配置的方法: 阅读全文
posted @ 2020-07-25 09:55 阿布都日 阅读(142) 评论(0) 推荐(0)