-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
### InitializingBean | ||
|
||
需要实现 afterPropertiesSet接口方法 | ||
|
||
参考 [https://blog.csdn.net/qq_37705525/article/details/124808168](https://blog.csdn.net/qq_37705525/article/details/124808168) | ||
|
||
### DisposableBean | ||
|
||
需要实现 destroy接口方法 | ||
|
||
参考 [https://blog.csdn.net/zhangduilei/article/details/78606636](https://blog.csdn.net/zhangduilei/article/details/78606636) | ||
|
||
### ApplicationContextInitializer | ||
|
||
ApplicationContextInitializer 接口用于在 Spring 容器刷新之前执行的一个回调函数,通常用于向 SpringBoot 容器中注入属性。 | ||
|
||
参考 [https://zhuanlan.zhihu.com/p/509824476](https://zhuanlan.zhihu.com/p/509824476) | ||
|
||
### ApplicationListener | ||
|
||
监听事件,可以包含部分生命周期类型的事件,例如ApplicationEnvironmentPreparedEvent | ||
|
||
[https://blog.csdn.net/qq_21484747/article/details/124855050](https://blog.csdn.net/qq_21484747/article/details/124855050) | ||
|
||
### EnvironmentPostProcessor | ||
|
||
一般用于读取环境变量达到多个微服务共同配置的修改与维护。当我们有多套环境(开发、测试、生产等等)时,每套环境都有专属的配置文件存放于配置中心(以nacos为例),可能存放于不同的配置中心(每个环境有专属的配置中心,服务地址不同),也可能存放于同一nacos的不同命名空间,也或者同一命名空间的不同分组等等。同一套代码在不同环境运行需要不同的配置文件,这时,我们就可以在项目启动时,实现EnvironmentPostProcessor接口,在postProcessEnvironment方法中读取环境变量或者启动命令参数,从而获取本环境下nacos的服务地址,或命名空间名称、分组名称等等,然后就可以根据获取的配置参数或环境变量来读取不同的配置文件,从而实现不同环境使用不同的配置文件,不用修改代码或者本地配置文件。 | ||
|
||
[https://blog.csdn.net/qq_40756113/article/details/123074848](https://blog.csdn.net/qq_40756113/article/details/123074848) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# nacos | ||
|
||
一个更易于构建云原生应用的动态服务发现、配置管理和服务管理平台 | ||
|
||
Nacos 致力于帮助您发现、配置和管理微服务。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据及流量管理。 | ||
|
||
[官方网站](https://nacos.io/) | ||
|
||
[官方文档](https://nacos.io/docs/latest/what-is-nacos/) | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,15 @@ ssh -v -o GSSAPIAuthentication=no [email protected] | |
``` | ||
增加参数 禁用GSSAPIAuthentication | ||
|
||
原因是client和server的ssh版本是不一致的,client的版本有点低。 | ||
原因是client和server的ssh版本是不一致的,client的版本有点低。 | ||
|
||
### 配置ssh免密登录 | ||
配置SSH免密登录的步骤如下: | ||
|
||
生成SSH密钥对。在本地计算机的终端或命令提示符中执行以下命令来生成SSH密钥对:ssh-keygen -t rsa,这将创建一个私钥(id_rsa)和一个公钥(id_rsa.pub)。 | ||
|
||
将公钥复制到目标服务器。使用ssh-copy-id命令将公钥复制到远程服务器上,例如ssh-copy-id username@remote_host,其中username是远程服务器的用户名,remote_host是远程服务器的地址或域名。 | ||
|
||
测试免密登录。在本地计算机上执行ssh命令,无需输入密码,例如ssh username@remote_host,如果一切正常,则表示SSH免密登录已成功配置。 | ||
|
||
此外,在目标服务器上,可能需要配置SSH服务以允许免密登录,这通常涉及编辑/etc/ssh/sshd_config文件,并添加RSAAuthentication和PubkeyAuthentication选项,并重启SSH服务。 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
### Optional | ||
|
||
[JDK8新特性-Optional类](https://baijiahao.baidu.com/s?id=1780195930536344267&wfr=spider&for=pc) |