JDBC Type            Java Type
CHAR                 String
VARCHAR              String
LONGVARCHAR          String
NUMERIC              java.math.BigDecimal
DECIMAL              java.math.BigDecimal
BIT                  boolean
BOOLEAN              boolean
TINYINT              byte
SMALLINT             short
INTEGER              int
BIGINT               long
REAL                 float
FLOAT                double
DOUBLE               double
BINARY               byte[]
VARBINARY            byte[]
LONGVARBINARY        byte[]
DATE                 java.sql.Date
TIME                 java.sql.Time
TIMESTAMP            java.sql.Timestamp
CLOB                 Clob
BLOB                 Blob
ARRAY                Array
DISTINCT             mapping of underlying type
STRUCT               Struct
更多详细配置规则,查询Mybatis中的TypeHandlerRegistry

安装rsyncd

编辑/etc/rsyncd.conf文本

默认port = 873
uid = rsync
gid = rsync
use chroot = yes
max connections = 200
pid file = /var/run/rsyncd.pid
exclude = lost+found/
transfer logging = yes
timeout = 14200
ignore nonreadable = yes
dont compress = .gz .tgz .zip .z .Z .rpm .deb .bz2

[hd]
path = /hd_backup
comment = hengda backup
ignore errors
#忽略错误
read only = false
#可写
list = false
#不能列表(不能使用ls类似的功能)
# hosts allow = 192.168.11.0/24 #允许那些机器链接
# hosts deny = 0.0.0.0/32 #禁用那些机器链接
auth users = rsync_backup
#虚拟用户
secrets file = /etc/rsync.password
#虚拟用户对应的账号及密码

创建rsync虚拟用户及启动虚拟用户

useradd rsync -s /sbin/nologin -M  #创建虚拟用户

rsync --daemon 或者 systemctl enable rsyncd 和 systemctl start rsyncd

mkdir /hd_backup/  #创建目录

chown rsync.rsync /hd_backup/  #改变其的数主、属组关系

创建rsync的密码文件,并设置成只有root用户才有权限

touch /etc/rsync.password  #创建

echo 'rsync_backup:oldboy' >>/etc/rsync.password  #写入

chmod 600 /etc/rsync.password  #修改其权限只有root能访问

客户端

echo 'oldboy' >/etc/rsync.password

chmod 600 /etc/rsync.password  #修改其权限只有root能访问

推送

方法一:rsync -az /backup/ rsync_backup@192.168.11.11::backup/ --password-file=/etc/rsync.password

方法二:rsync -az /backup/ rsync://rsync_backup@192.168.11.11/backup/ --password-file=/etc/rsync.password

这里是

rsync -r -v -z -c -t -P -u --safe-links --progress --port= --bwlimit=512 /root/jdk1.8.0_251 rsync://rsync_backup@150.109.60.57/hd/ --password-file=/etc/rsync.password

或者 -v 改为 -q

rsync -r -q -z -c -t -P -u --safe-links --progress --port= --bwlimit=512 /root/jdk1.8.0_251 rsync://rsync_backup@150.109.60.57/hd/ --password-file=/etc/rsync.password

mvn dependency:copy-dependencies -DoutputDirectory=lib

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <layout>ZIP</layout>
                <includes>
                    <include>
                        <groupId>nothing</groupId>
                        <artifactId>nothing</artifactId>
                    </include>
                </includes>
            </configuration>
        </plugin>
    </plugins>
</build>

mvn package

java -Dloader.path="lib/" -jar service.jar

1.pom.xml加入依赖

<dependencies>
<!--添加热部署-->

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <optional>true</optional>
        <scope>true</scope>
    </dependency>

另外下面的代码是放在<build> 下面<plugins>里的

<plugin>

<!--热部署配置-->
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <!--fork:如果没有该项配置,整个devtools不会起作用-->
                <fork>true</fork>
            </configuration>
        </plugin>
  1. 设置IDEA的自动编译:

2.1. File-Settings-Compiler勾选 Build Project automatically

2.2. 快捷键 ctrl + shift + alt + /,选择Registry,勾上 Compiler autoMake allow when app running