springboot
-droidcoffee-
这个作者很懒,什么都没留下…
展开
-
spring boot源码学习 SpringApplication(一)
启动类 SpringApplication关键代码new SpringApplication(primarySources).run(args)主要看一下 构造方法,和run方法 代码执行流程不记录,自己debug 只是记录一下涉及到的比较重要的类,期间可以学到一些相关的设计思想吧org.springframework.util.StopWatch 记录服务的启动时间o原创 2018-01-25 14:31:26 · 379 阅读 · 0 评论 -
redis和session共享同时使用 报错
reids报错/** * 注意如果 JedisConnectionFactory与JedisPool一起使用会报错<br/> * * @return */ @Bean @Order(2) // @ConfigurationProperties(prefix = "spring.redis") public...原创 2018-03-24 16:01:42 · 1373 阅读 · 0 评论 -
SpringBoot Bean加载顺序 Order无效
@Bean @Order(1) public xxx1 createXxx1() { return new xxx1(); } @Bean @Order(2) public xxx2 createXxx2() { return new xxx2(); }经过测试 ,病不起作用。 目前经过测试、O...原创 2018-03-24 14:34:57 · 11772 阅读 · 13 评论 -
tk mapper 通用mapper的bug
<bean class="tk.mybatis.spring.mapper.MapperScannerConfigurer"> <property name="basePackage" value="com.isea533.mybatis.mapper"/> <property name="properties"原创 2018-03-14 12:42:42 · 6904 阅读 · 5 评论 -
springboot 对404的处理
默认情况下发送一个不存在的请求、该请求会转发到/${context-path}/error 并且不会被ControllerAdvice拦截2018-03-06 10:30:20.969 WARN [http-nio-9090-exec-5] - No mapping found for HTTP request with URI [/oa/appmanager/queryList] in ...原创 2018-03-06 15:05:16 · 3557 阅读 · 0 评论 -
Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.or原创 2018-03-04 16:46:30 · 1393 阅读 · 0 评论 -
springboot读取配置文件
在bootstrapt.yml文件中配置spring: profiles: active: - test include: - config1, config2除了会加载application.yml 还会加载 ??? application-test.yml application-config1.yml application-config2....原创 2018-03-02 17:02:20 · 713 阅读 · 0 评论 -
eclipse 导入整个spring boot源码
1、先创建一个maven projectC:\Users\coffee\OneDrive\workspace\spring.boot-git2、把https://github.com/spring-projects/spring-boot/tree/1.5.x 下载下来的工程解压 直接从eclipse中复制。并且覆盖pom.xml 3、右击 工程 import ...原创 2018-03-02 14:04:59 · 6389 阅读 · 0 评论 -
spring bean 动态创建、核心类ApplicationContext 、AutowireCapableBeanFactory
public class SpringBeanUtil implements ApplicationContextAware { @Autowired private static ApplicationContext context = null; private Bean1 bean1; private Bean2 bean2; public vo...原创 2018-01-30 14:31:33 · 961 阅读 · 0 评论 -
spring boot上传文件 The temporary upload location is not valid
Caused by: java.io.IOException: The temporary upload location [C:\Users\coffee\AppData\Local\Temp\tomcat.8572785615189560421.9999\work\Tomcat\localhost\ROOT] is not valid at org.apache.catalina.co...原创 2018-02-08 16:57:00 · 6673 阅读 · 1 评论 -
springboot 记录一次源码编译过程的纠错
C:\Users\coffee\OneDrive\git\spring-boot-1.5.10\spring.boot>mvn clean install -Dmaven.test.skip=true[INFO] Scanning for projects...[ERROR] [ERROR] Some problems were encountered while processing ...原创 2018-02-27 11:25:13 · 2501 阅读 · 3 评论 -
spring boot EnableAutoConfiguration exclude 无效
首先讲一下SpringBootApplication注解 源码定义为@Target(ElementType.TYPE)@Retention(RetentionPolicy.RUNTIME)@Documented@Inherited@SpringBootConfiguration@EnableAutoConfiguration@ComponentScan(excludeFilter...原创 2018-02-26 09:31:45 · 10395 阅读 · 5 评论 -
spring boot源码学习 SpringApplication(二)-Banner
先说一下 banner相关的配置属性#spring.main.bannerMode=off # 关闭banner打印#banner.location=coffee.banne # 设置banner文本文件的位置 、相对于src/main/resources#banner.image.location=11111.jpg #设置图片、打印的时候会乱码代码中的用法Banner prin原创 2018-01-28 16:50:29 · 353 阅读 · 0 评论 -
spring boot启动 Unregistering JMX-exposed beans on shutdown
2018-01-25 09:06:50.702 INFO 12124 --- [ main] com.example.demo.Application : Starting Application on LAPTOP-2439E8FA with PID 12124 (C:\workspace\boot.interceptor\target\classe原创 2018-01-25 16:23:44 · 2490 阅读 · 0 评论 -
Springboot 动态刷新的几点注意
1、bootstrap.yml中的配置属性 无法动态刷新 只能添加在application.yml中 2、需要在调用的地方添加@RefreshScope、不能只在Application上添加 3 、需要引入依赖 <dependency> <groupId>org.springframework.boot</groupId> <a...原创 2018-05-07 14:10:52 · 7981 阅读 · 0 评论