mysql5.7 字符集utf8mb4的默认排序规则为utf8mb4_general_ci
mysql8 字符集utf8mb4的默认排序规则为utf8mb4_0900_ai_cimysql5.7升级为mysql8后更改字符集和排序规则方式有以下几种
只修改库字符集和排序规则
ALTER DATABASE database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
只更改表字符集和排序规则
ALTER TABLE table_name CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
只更改字段字符集和排序规则
ALTER TABLE table_name CHANGE COLUMN column_name varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '字段备注';
- 同时更改表和改表下所有字段字符集和排序规则
ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
&,./test &
一般在执行shell命令的时候我们在命令的后面加上一个‘&’,这样就可以使得该程序在后台运行,但是当程序运行起来之后依旧会再次在shell中输出打印信息,shell依旧被占用,关闭shell则程序退出;这个时候我们可以使用ctrl+z命令,使得这个信息消失,可以做别的事情,但是关闭shell的时候程序依旧会退出
./test >> out.txt 2>&1 &
2>&1是指将标准错误重定向到标准输出,于是标准错误和标准输出都重定向到指定的out.txt文件中,从此终端彻底清静了。
nohup ./test & nohup ./test > myout.txt 2>&1 & nohup -c ./test > myout.txt 2>&1 &
nohup打日志不实时,可以加-c让日志实时写到文件
父pom引用
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> </dependency>
子工程eureka中引用
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId> </dependency>
这时启动eureka时报错
xception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cloud.netflix.eureka.server.EurekaServerInitializerConfiguration': Unsatisfied dependency expressed through field 'eurekaServerBootstrap'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'eurekaServerBootstrap' defined in class path resource [org/springframework/cloud/netflix/eureka/server/EurekaServerAutoConfiguration.class]: Unsatisfied dependency expressed through method 'eurekaServerBootstrap' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'eurekaServerContext': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: com/sun/jersey/client/apache4/ApacheHttpClient4
Spring Cloud 2020版本开始 Bootstrap上下文默认不再启动,改为了spring.config.import的方式,如需开启bootstrap启动方式,有两种方式:
设置值spring.cloud.bootstrap.enabled=true或者 spring.config.use-legacy-processing=true。
注意:这些个属性值必须确保其能放进环境里才能生效。比如:环境变量,系统属性,命令行等引入一个spring-cloud-starter-bootstrap
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-bootstrap</artifactId> </dependency>
A vuepress plugin for generate static post link based on post file name.
安装
npm install vuepress-plugin-shortlink --save
从config.js配置中删除 permalink,该插件是基于默认永久链接/:regular
例子
version 1.0
source: /books/a-book.md permalink: /books/261f97f7.html source: /hello-word.md permalink: /b1d4025b.html source: /books/computer/a-book.md permalink: /books/computer/261f97f7.html
设定参数
该插件基于vuepress-plugin-clean-urls,可以自定义后缀和404,设定方法同vuepress-plugin-clean-urls
plugins: [ [ 'vuepress-plugin-shortlink', { normalSuffix: '/', indexSuffix: '/', notFoundPath: '/404.html' }, ], ],
version 1.1
增加配置containDirs
可设定只当文件夹全路径,其余只保留文件路径plugins: [ [ 'vuepress-plugin-shortlink', { normalSuffix: '/', indexSuffix: '/', notFoundPath: '/404.html', containDirs: ['/books'] }, ], ],
地址展示
source: /books/a-book.md permalink: /books/261f97f7/ source: /hello-word.md permalink: /b1d4025b/ source: /say/hello-word.md permalink: /b1d4025b/ source: /books/computer/a-book.md permalink: 261f97f7/
ThanksFor