0%

VTE的定义

VTE(venous thromboembolism)是指血液在深静脉内不正常的凝结,使管腔部分或完全阻塞,引起的一系列临床症状的疾病,严重危及群众生命安全。

阅读全文 »

使用场景:

  1. 数据库误操作,只好使用使用原来的备份数据去恢复数据,但是数据量太大,只好使用SQLDumpSplitter将大文件分割成小文件,然后恢复指定的表即可。
  2. 数据库备份数据到一个sql脚本中,大小是1G,要将其导入到新的数据库中。在使用navicat导入数据时,速度很慢很慢。想到将sql文件拆分出来进行处理。
image-20220617103648865

很多时候我们会有一份较大的SQL文件,导入恢复数据时产生超时现象,因为经常会受限于服务器所规定的脚本运行时间。而SQLDumpSplitter正好可以解决SQL文件过大的问题,它能把一份较大的SQL文件分割成数个指定大小的SQL文件,就能避免因文件过大导致运行时间过长而产生超时的问题。最厉害的是SQLDumpSplitter可以自动将结构语句和数据语句分开,所以无需担心分割出错,一切都是自动的。

image-20220617103708215

而更多的时候,你可能难以打开一个几百兆大小的SQL文件来进行检查,这时候就可以用SQLDumpSplitter进行分割,分割成一个个小的SQL文件,你就可以轻松打开它们并检查里面的内容。

官网地址: https://philiplb.de/sqldumpsplitter3/

问题描述

.properties文件乱码

image-20220608163130322

解决方案

Preferences –> Editor –> File Encodings

image-20220608163245238

image-20220608171448934

https://maven.apache.org/plugins/maven-dependency-plugin/purge-local-repository-mojo.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>purge-local-repository</id>
<phase>process-sources</phase>
<goals>
<goal>purge-local-repository</goal>
</goals>
<configuration>
<includes>
<include>cn.joinhealth.celina:paas-common</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>

Full name:

org.apache.maven.plugins:maven-dependency-plugin:3.3.0:purge-local-repository

Description:

When run on a project, remove the project dependencies from the local repository, and optionally re-resolve them. Outside of a project, remove the manually given dependencies.

Attributes:

  • The goal is thread-safe and supports parallel builds.
  • Since version: 2.0.

Optional Parameters

Name Type Since Description
<actTransitively> boolean 2.0 Whether this mojo should act on all transitive dependencies. Default value is true. Default value is: true. User property is: actTransitively.
<exclude> String 2.0 Comma-separated list of groupId:artifactId entries, which should be used to exclude artifacts from deletion/refresh. This is a command-line alternative to the excludes parameter, since List parameters are not currently compatible with CLI specification. User property is: exclude.
<excludes> List 2.0 The list of dependencies in the form of groupId:artifactId which should NOT be deleted/refreshed.
<include> String 2.6 Comma-separated list of groupId:artifactId entries, which should be used to include artifacts for deletion/refresh. This is a command-line alternative to the includes parameter, since List parameters are not currently compatible with CLI specification. User property is: include.
<includes> List 2.6 The list of dependencies in the form of groupId:artifactId which should BE deleted/refreshed.
<manualInclude> String 2.6 Comma-separated list of groupId:artifactId entries, which should be used to manually include artifacts for deletion. This is a command-line alternative to the manualIncludes parameter, since List parameters are not currently compatible with CLI specification. User property is: manualInclude.
<manualIncludes> List 2.6 The list of dependencies in the form of groupId:artifactId which should BE deleted/purged from the local repository. Note that using this parameter will deactivate the normal process for purging the current project dependency tree. If this parameter is used, only the included artifacts will be purged. The manualIncludes parameter should not be used in combination with the includes/excludes parameters.
<reResolve> boolean 2.0 Whether to re-resolve the artifacts once they have been deleted from the local repository. If you are running this mojo from the command-line, you may want to disable this. By default, artifacts will be re-resolved. Default value is: true. User property is: reResolve.
<resolutionFuzziness> String 2.0 Determines how liberally the plugin will delete an artifact from the local repository. Values are: file - Eliminate only the artifact’s file.version (default) - Eliminate all files associated with the version of the artifact.artifactId - Eliminate all files associated with the artifact’s artifactId.groupId - Eliminate all files associated with the artifact’s groupId. Default value is: version. User property is: resolutionFuzziness.
<skip> boolean 2.7 Skip plugin execution completely. Default value is: false. User property is: skip.
<snapshotsOnly> boolean 2.4 Whether to purge only snapshot artifacts. Default value is: false. User property is: snapshotsOnly.
<verbose> boolean 2.0 Whether this plugin should output verbose messages. Default is false. Default value is: false. User property is: verbose.

Parameter Details

Whether this mojo should act on all transitive dependencies. Default value is true.

  • Type: boolean
  • Since: 2.0
  • Required: No
  • User Property: actTransitively
  • Default: true

Comma-separated list of groupId:artifactId entries, which should be used to exclude artifacts from deletion/refresh. This is a command-line alternative to the excludes parameter, since List parameters are not currently compatible with CLI specification.

  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • User Property: exclude

The list of dependencies in the form of groupId:artifactId which should NOT be deleted/refreshed.

  • Type: java.util.List
  • Since: 2.0
  • Required: No

Comma-separated list of groupId:artifactId entries, which should be used to include artifacts for deletion/refresh. This is a command-line alternative to the includes parameter, since List parameters are not currently compatible with CLI specification.

  • Type: java.lang.String
  • Since: 2.6
  • Required: No
  • User Property: include

The list of dependencies in the form of groupId:artifactId which should BE deleted/refreshed.

  • Type: java.util.List
  • Since: 2.6
  • Required: No

Comma-separated list of groupId:artifactId entries, which should be used to manually include artifacts for deletion. This is a command-line alternative to the manualIncludes parameter, since List parameters are not currently compatible with CLI specification.

  • Type: java.lang.String
  • Since: 2.6
  • Required: No
  • User Property: manualInclude

The list of dependencies in the form of groupId:artifactId which should BE deleted/purged from the local repository. Note that using this parameter will deactivate the normal process for purging the current project dependency tree. If this parameter is used, only the included artifacts will be purged. The manualIncludes parameter should not be used in combination with the includes/excludes parameters.

  • Type: java.util.List
  • Since: 2.6
  • Required: No

Whether to re-resolve the artifacts once they have been deleted from the local repository. If you are running this mojo from the command-line, you may want to disable this. By default, artifacts will be re-resolved.

  • Type: boolean
  • Since: 2.0
  • Required: No
  • User Property: reResolve
  • Default: true

Determines how liberally the plugin will delete an artifact from the local repository. Values are:

  • file - Eliminate only the artifact’s file.

  • version (default) - Eliminate all files associated with the version of the artifact.

  • artifactId - Eliminate all files associated with the artifact’s artifactId.

  • groupId - Eliminate all files associated with the artifact’s groupId.

  • Type: java.lang.String

  • Since: 2.0

  • Required: No

  • User Property: resolutionFuzziness

  • Default: version


Skip plugin execution completely.

  • Type: boolean
  • Since: 2.7
  • Required: No
  • User Property: skip
  • Default: false

Whether to purge only snapshot artifacts.

  • Type: boolean
  • Since: 2.4
  • Required: No
  • User Property: snapshotsOnly
  • Default: false

Whether this plugin should output verbose messages. Default is false.

  • Type: boolean
  • Since: 2.0
  • Required: No
  • User Property: verbose
  • Default: false

备份脚本

1
2
3
4
5
# -uroot 用户名
# -pjianhai520 密码
# cloud_followup 需备份数据库
# "D:\yunsuifang\bak\20220422_bak.sql" 备份文件路径
C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump --opt -Q -uroot -p123456 --default-character-set=utf8 cloud_followup> "D:\yunsuifang\bak\20220422_bak.sql"

恢复

1
2
3
4
5
6
7
8
9
10
11
12
# 连接
mysql -u root -p -h 127.0.0.1
# 选择数据库
mysql>use cloud_followup;
Database changed

# 修改配置,加快导入速度
mysql> set global innodb_flush_log_at_trx_commit=0;
mysql> set global max_allowed_packet=1024*1024*20;
mysql> set global bulk_insert_buffer_size=32*1024*1024;
mysql> set global innodb_buffer_pool_size=32*1024*1024;
mysql> exit;

source 命令导入备份文件,需要指定-h指定主机地址,否则遇到错误(找不到主机)会中断导入。使用以下语句导入:

1
mysql -hlocalhost -P3306 -uroot -proot -Dcloud_followu --default-character-set=utf8 < d:/data/demo.sql

--default-character-set=utf8指定和导出一样的编码,也是容易出错的地方