徐晓伟

Results 37 comments of 徐晓伟

我尝试制作了docker版,源码:https://github.com/xuxiaowei-com-cn/dragonwell8 docker hub:https://hub.docker.com/r/xuxiaoweicomcn/dragonwell8

https://hub.docker.com/r/xuxiaoweicomcn/murphysec JDK 8/11 项目 GitLab Runner 集成:https://gitlab.com/xuxiaowei-cloud/xuxiaowei-cloud/-/blob/main/.gitlab-ci.yml JDK 17 项目 GitLab Runner 集成:https://gitlab.com/xuxiaowei-cloud/xuxiaowei-cloud-next/-/blob/main/.gitlab-ci.yml

统一代码配置 https://github.com/pig-mesh/pig/blob/95d0091c3e74fb9d0246724619fc2a1bf0bd71cd/pig-gateway/src/main/resources/application.yml ![image](https://github.com/pig-mesh/pig/assets/46893436/208d4e31-b323-4526-89ee-0b7dad5c12fa)

十二要素宣言:https://12factor.net/zh_cn/ https://github.com/pig-mesh/pig/blob/95d0091c3e74fb9d0246724619fc2a1bf0bd71cd/pig-gateway/src/main/resources/application.yml ![image](https://github.com/pig-mesh/pig/assets/46893436/afdfa51a-1537-484a-aa87-d60daa2e9e53)

1. 从下列打包可以看出,执行 `mvn clean install` 后,原来配置文件中是 `[email protected]@.yml`,打包后的产物是 `application-dev.yml` 2. 也就是说,打包后的产物配置固定了,无法在程序启动时通过 `参数 -Pxxx` 修改配置了 3. 只能在打包时指定 `参数 -Pxxx`,也就是说,一个包可能只能在一个环境中使用,如果配置发生了变化,也只能通过重新打包来解决此问题(启动时,全部使用参数进行指定是不现实的做法) ``` xuxiaowei@DESKTOP-8E6LUNV MINGW64 /d/IdeaProjects-jihulab.com/mirrors-gitee/log4j/pig (jdk17-dev) $ mvn clean install [INFO] Scanning for projects......

测试环境已通过,正式环境需要重新打包,如何保证正式环境的打包产物与测试环境相同? 1. Maven 快照随时能修改、删除:在测试打包后,正式打包前,Maven 快照可能发生变化 2. npm 包随时能修改、删除:在测试打包后,正式打包前,npm 包发生了变化 3. docker 镜像随时能修改、删除:在测试打包后,正式打包前,docker 镜像发生了变化 4. ......

> > > > 给 nacos 指定一个 namespace,从环境变量中去读取,就可以实现一份代码多端部署了吧。配置都放到了 nacos ,都是在 nacos 操作的。 理想状态下,所有“打包产物中的配置”,都可以使用环境变量进行修改

[:sparkles: Support MyBatis for Spring Boot 3 Native](https://github.com/mybatis/spring-boot-starter/issues/994)

https://github.com/huaweicloud/huaweicloud-sdk-python-obs/blob/master/examples/post_object_sample.py#L134 ![image](https://github.com/huaweicloud/huaweicloud-sdk-python-obs/assets/46893436/1b15ba6b-fd7f-4731-86ae-c5070af76639)

Please delete the original database or table during testing