{"id":20420353,"url":"https://github.com/deepraining/spring-boot-starter2","last_synced_at":"2026-05-11T15:03:06.209Z","repository":{"id":188649121,"uuid":"678664807","full_name":"deepraining/spring-boot-starter2","owner":"deepraining","description":"spring-boot-starter v2","archived":false,"fork":false,"pushed_at":"2024-08-26T06:53:58.000Z","size":272,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-26T08:34:06.183Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deepraining.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2023-08-15T04:25:45.000Z","updated_at":"2024-08-26T06:54:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"301c414a-a9ef-43b6-95ca-988bdd2fe86d","html_url":"https://github.com/deepraining/spring-boot-starter2","commit_stats":null,"previous_names":["deepraining/spring-boot-starter2"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepraining%2Fspring-boot-starter2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepraining%2Fspring-boot-starter2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepraining%2Fspring-boot-starter2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepraining%2Fspring-boot-starter2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepraining","download_url":"https://codeload.github.com/deepraining/spring-boot-starter2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241963851,"owners_count":20049912,"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","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-11-15T06:42:33.304Z","updated_at":"2026-05-11T15:03:01.189Z","avatar_url":"https://github.com/deepraining.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spring-boot-starter v2\n\n与 [spring-boot-starter v1](https://github.com/deepraining/spring-boot-starter) 的不同点是使用 [mybatis-plus](https://baomidou.com/) 作为数据库驱动层\n\n- `pro-common`: 通用代码\n- `pro-mp`: [mybatis-plus-generator](https://baomidou.com/pages/779a6e/) 生成代码\n- `pro-admin`: 使用 JWT 保持登陆状态的后台管理应用，包括基于角色的访问控制（RBAC），示例前端项目 [sbs-admin-web](https://github.com/deepraining/sbs-admin-web)\n- `pro-front`: 使用 Session-Cookie 保持登陆状态的前端应用\n- `pro-dds`: 使用 [dynamic-datasource](https://github.com/baomidou/dynamic-datasource) 的MySql多数据源支持\n\n## 其他说明\n\n- 因为 `mybatis-plus-generator` 源代码里的模版文件是 `CRLF` 换行符，所以复制到项目中统一为 `LF` 换行符\n- MySql多数据源项目中，非 `primary` 数据源的代码，需要添加 `@DS(\"non-primary\")`，如果使用 `mybatis-plus-generator` 生成代码，就需要修改`mapper`与`service`模版文件，[示例查看](./pro-dds-mp3/src/main/resources/tpl_modify) \n\n#### 在 MySql 中，如果数据表名或字段名是关键字，可以如下设置\n\n在`application.yml`配置文件中，设置执行mysql语句时都用反引号包裹\n\n```\nmybatis-plus:\n  global-config:\n    db-config:\n      table-format: '`%s`'\n      column-format: '`%s`'\n```\n\n生成代码时，`entity`加上`@TableField`注解\n\n```\n.strategyConfig(builder -\u003e {\n  builder\n    .entityBuilder()\n    .enableTableFieldAnnotation();\n})\n```\n\n修改`entity.java.ftl`模版文件中的`@TableField`（`keepGlobalFormat`默认为`false`，不使用全局配置）\n\n```\n@TableField(...)\n\n==\u003e\n\n@TableField(..., keepGlobalFormat = true)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepraining%2Fspring-boot-starter2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepraining%2Fspring-boot-starter2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepraining%2Fspring-boot-starter2/lists"}