This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.text.SimpleDateFormat; | |
import java.time.LocalDateTime; | |
import java.time.ZoneId; | |
import java.time.ZoneOffset; | |
import java.util.Date; | |
public class DateUtils { | |
private DateUtils() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HexUtils { | |
private HexUtils() { | |
} | |
/** | |
* 16进制转2进制 | |
* | |
* @param str | |
* @return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.commons.codec.binary.Base64; | |
import javax.imageio.ImageIO; | |
import java.awt.*; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.InputStream; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.validation.*; | |
import java.util.*; | |
/** | |
* 校验工具类 | |
*/ | |
public class ValidationUtils { | |
/** | |
* @param t 要校验的数据 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### MYSQL获取一整月的日期列 | |
## 第一种 | |
SELECT | |
date_list, | |
CASE | |
DAYOFWEEK( date_list ) | |
WHEN 1 THEN | |
'星期日' | |
WHEN 2 THEN | |
'星期一' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- 共有8个级别,按照从低到高为:ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < OFF --> | |
<!-- status指定log4j本身的打印日志的级别 --> | |
<Configuration status="WARN"> | |
<Properties> | |
<Property name="base.package">com.example.demo</Property> | |
<Property name="log.level">${sys:log4j.log.level:-DEBUG}</Property> | |
<Property name="logfile.path">${sys:log4j.logfile.path:-/data/logs/access}/@artifactId@</Property> | |
<Property name="logfile.arch.path">${sys:log4j.logfile.path:-/data/logs/access}/@artifactId@/${date:yyyy-MM}</Property> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.util.StringUtils; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class StringUtil { | |
private StringUtil() { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lombok.Getter; | |
import lombok.Setter; | |
import lombok.experimental.Accessors; | |
import java.io.Serializable; | |
import java.util.List; | |
import java.util.Map; | |
@Getter | |
@Setter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.demo.config.ds; | |
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder; | |
import org.apache.ibatis.session.SqlSessionFactory; | |
import org.mybatis.spring.SqlSessionFactoryBean; | |
import org.mybatis.spring.SqlSessionTemplate; | |
import org.mybatis.spring.annotation.MapperScan; | |
import org.springframework.beans.factory.annotation.Qualifier; | |
import org.springframework.boot.context.properties.ConfigurationProperties; | |
import org.springframework.context.annotation.Bean; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.Serializable; | |
import java.util.List; | |
/** | |
* 分页Bean | |
*/ | |
public class PageInfo implements Serializable { | |
private static final long serialVersionUID = 1L; |
NewerOlder