随笔分类 - SpringBoot
摘要:前言 Spring Boot能帮助我们Java开发者快速开发基于Spring框架的应用,除了其作为依赖管理好帮手的一众Spring-Boot-Starter之外,其自动装配(Auto Configure)特性也起到了非常重要的作用。那么Spring Boot是如何实现自动装配的呢?本文将结合源码去讲
阅读全文
摘要:目录 1、appender 1.1、ConsoleAppender 1.2、FileAppender 1.3、RollingFileAppender 1.4、其他**Appender 2、encoder 正文 回到顶部 1、appender <appender>是<configuration>的子节
阅读全文
摘要:1、根节点<configuration>包含的属性 scan: 当此属性设置为true时,配置文件如果发生改变,将会被重新加载,默认值为true。 scanPeriod: 设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为
阅读全文
摘要:package com.liftsail.qiniurefererdemo.test; import java.util.ArrayList; import java.util.List; import java.util.ListIterator; /** * @Author: liftsail
阅读全文
摘要:阿里云分片上传 import com.aliyun.oss.ClientException; import com.aliyun.oss.OSS; import com.aliyun.oss.OSSClientBuilder; import com.aliyun.oss.OSSException;
阅读全文
摘要:import com.qiniu.common.QiniuException; import com.qiniu.http.Client; import com.qiniu.util.Auth; import test.com.qiniu.TempFile; import java.io.File;
阅读全文
摘要:package com.liftsail.testprofiledemo.utiltest; import org.springframework.util.CollectionUtils; import java.util.*; /** * @Author: liftsail * @Date: 2
阅读全文
摘要://Java拼接字符串时,去掉最后一个多余的逗号 String str[] = { "hello", "beijing", "world", "shenzhen" }; StringBuffer buf = new StringBuffer(); for (int i = 0; i < str.le
阅读全文
摘要:<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/P
阅读全文
摘要:1.项目结构 2.代码实现 QuartzConfig package com.liftsail.quartzpersisteddemo.quartz.config; import org.quartz.Scheduler; import org.springframework.beans.facto
阅读全文
摘要:1.maven依赖 <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.10</version> </dependency> 2.代码 package com.
阅读全文
摘要:关于配置执行定时任务和异步任务的线程池配置类1 package com.liftsail.rsademo.utils; import lombok.extern.slf4j.Slf4j; import org.springframework.aop.interceptor.AsyncUncaught
阅读全文
摘要:了解log4j、log4j2之间的关系;以及与slf4j整合时使用的中间jar包:slf4j-log4j12、log4j-slf4j-impl。 1.Log4j log4j核心包只有一个,即log4j.jar。上图是log4j最后的版本,版本号是1.2 包名:org.apache.log4j 配置文
阅读全文
摘要:demo01 import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.IOException; public class Test { private final static int BU
阅读全文
摘要:1. @Autowired的默认装配 我们都知道在spring中@Autowired注解,是用来自动装配对象的。通常,我们在项目中是这样用的: package com.sue.cache.service; import org.springframework.stereotype.Service;
阅读全文
摘要:Windows1、指定端口 java -jar springboot.jar --server.port=81812、指定配置文件 java -jar springboot.jar --spring.profiles.active=dev3、同时指定端口与配置文件 java -jar springb
阅读全文
摘要:目录 IDEA 配置 SVN 拉取代码 IDEA + SVN 将文件回退到历史版本 IDEA 更新 SVN 代码解决冲突 IDEA + SVN 与资源库同步 IDEA 为 SVN 打分支或标签 IDEA 忽略提交文件到 SVN 与 取消纳入版本控制 IDEA 配置 SVN 拉取代码1、电脑上先安装
阅读全文
摘要:本文介绍如何在SpringBoot中配置Redisson 官网网址 redisson-spring-boot-starter配置方案:redisson/redisson-spring-boot-starter at master · redisson/redisson · GitHub spring
阅读全文
摘要:<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <outputDirect
阅读全文