{"id":15778907,"url":"https://github.com/v5tech/springboot-package-example","last_synced_at":"2025-08-16T16:03:07.250Z","repository":{"id":149461822,"uuid":"264849654","full_name":"v5tech/springboot-package-example","owner":"v5tech","description":"spring boot 应用多环境打包部署，增量更新、自动化shell脚本","archived":false,"fork":false,"pushed_at":"2020-05-18T07:21:58.000Z","size":6,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-16T16:02:09.838Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/v5tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-05-18T06:36:44.000Z","updated_at":"2022-05-13T16:23:08.000Z","dependencies_parsed_at":"2023-04-19T03:16:37.413Z","dependency_job_id":null,"html_url":"https://github.com/v5tech/springboot-package-example","commit_stats":null,"previous_names":["v5tech/springboot-package-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/v5tech/springboot-package-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v5tech%2Fspringboot-package-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v5tech%2Fspringboot-package-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v5tech%2Fspringboot-package-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v5tech%2Fspringboot-package-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/v5tech","download_url":"https://codeload.github.com/v5tech/springboot-package-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v5tech%2Fspringboot-package-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270734952,"owners_count":24636271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-04T18:01:32.398Z","updated_at":"2025-08-16T16:03:07.184Z","avatar_url":"https://github.com/v5tech.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# springboot-package-example\n\nspring boot 应用多环境打包部署，增量更新、自动化shell脚本\n\n\u003e spring-boot-maven-plugin插件默认构建的可执行 jar 体积比较大。当项目成熟稳定后所有的依赖基本也就不会有变化了。\n\u003e 后期迭代维护更新只需要构建出业务相关的代码。然后上传服务器替换相应的 jar 包即可。此方式构建出的 jar 包体积大幅度减小，\n\u003e 极大的提高工作效率。同时该方式遵循 spring boot 规范要求，将配置文件外部化放置。可直接修改配置文件重启生效。\n\n工程目录结构\n\n```\nspringboot-package-example\n├── README.md\n├── build.sh\n├── logs\n├── pom.xml\n└── src\n    ├── assembly\n    │   └── assembly.xml\n    └── main\n        ├── java\n        │   └── net\n        │       └── ameizi\n        │           └── springboot\n        │               └── pack\n        │                   └── example\n        │                       └── SpringPackageExampleApplication.java\n        ├── resources\n        │   ├── application-dev.yml\n        │   ├── application-local.yml\n        │   ├── application-prod.yml\n        │   ├── application-test.yml\n        │   ├── application-uat.yml\n        │   ├── application.yml\n        │   ├── mapper\n        │   ├── static\n        │   └── templates\n        └── scripts\n            └── bootstrap.sh\n```\n\n打包构建\n\n```bash\n$ springboot-package-example    master !1  ./build.sh test # 测试环境\n$ springboot-package-example    master !1  ./build.sh uat # uat环境\n$ springboot-package-example    master !1  ./build.sh prod # prod环境\n```\n\n最终构建好的文件为 `springboot-package-example-1.0.0-uat.zip`,解压后的目录结构如下所示：\n\n```\ndrwxr-xr-x amz staff  256 B  Mon May 18 14:57:22 2020  .\ndrwxr-xr-x amz staff  384 B  Mon May 18 14:57:55 2020  ..\ndrwxr-xr-x amz staff   96 B  Mon May 18 11:27:02 2020  bin\ndrwxr-xr-x amz staff  128 B  Mon May 18 14:57:18 2020  config\ndrwxr-xr-x amz staff  1.3 KB Mon May 18 14:57:20 2020  lib\ndrwxr-xr-x amz staff   96 B  Mon May 18 14:09:06 2020  logs\n.rw-r--r-- amz staff  1.8 KB Mon May 18 14:57:14 2020  README.md\n.rwxr-xr-x amz staff 98.9 KB Mon May 18 14:57:22 2020  springboot-package-example-1.0.0.jar\n```\n\n目录结构说明：\n\n| bin                                  | 程序运行脚本                                     |\n| ------------------------------------ | ------------------------------------------------ |\n| config                               | 外部化配置文件                                   |\n| lib                                  | 第三方依赖                                       |\n| logs                                 | 日志存放文件                                     |\n| README.md                            | 使用说明                                         |\n| springboot-package-example-1.0.0.jar | 目标应用程序。程序有修改时，只需要替换该文件即可 |\n\n启动应用\n\n```bash\n$ springboot-package-example-1.0.0    master !1  ./bin/bootstrap.sh start\n$ springboot-package-example-1.0.0    master !1  ./bin/bootstrap.sh stop\n```\n\n代码有修改时只需要重新打包后替换`springboot-package-example-1.0.0.jar`即可。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv5tech%2Fspringboot-package-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fv5tech%2Fspringboot-package-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv5tech%2Fspringboot-package-example/lists"}