{"id":41885647,"url":"https://github.com/finefuture/gazelle","last_synced_at":"2026-01-25T13:30:49.695Z","repository":{"id":57733208,"uuid":"116616465","full_name":"finefuture/gazelle","owner":"finefuture","description":"一个小巧简便的Jpa组件","archived":false,"fork":false,"pushed_at":"2018-03-23T03:17:48.000Z","size":478,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-31T08:33:23.431Z","etag":null,"topics":["gazelle","jpa"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/finefuture.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-08T02:00:50.000Z","updated_at":"2020-07-14T14:17:34.000Z","dependencies_parsed_at":"2022-09-26T22:11:18.164Z","dependency_job_id":null,"html_url":"https://github.com/finefuture/gazelle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/finefuture/gazelle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finefuture%2Fgazelle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finefuture%2Fgazelle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finefuture%2Fgazelle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finefuture%2Fgazelle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/finefuture","download_url":"https://codeload.github.com/finefuture/gazelle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finefuture%2Fgazelle/sbom","scorecard":{"id":400114,"data":{"date":"2025-08-11","repo":{"name":"github.com/finefuture/gazelle","commit":"10fef0f1921d7dce364e4c2b783f921db84fe7f4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 1/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"23 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-6pcc-3rfx-4gpm","Warn: Project is vulnerable to: GHSA-hwj3-m3p6-hj38","Warn: Project is vulnerable to: GHSA-4vrv-ch96-6h42","Warn: Project is vulnerable to: GHSA-g76j-4cxx-23h9","Warn: Project is vulnerable to: GHSA-jcq3-cprp-m333","Warn: Project is vulnerable to: GHSA-m6vm-37g8-gqvh","Warn: Project is vulnerable to: GHSA-8grg-q944-cch5","Warn: Project is vulnerable to: GHSA-j8jw-g6fq-mp7h","Warn: Project is vulnerable to: GHSA-36p3-wjmg-h94x","Warn: Project is vulnerable to: GHSA-hh26-6xwr-ggv7","Warn: Project is vulnerable to: GHSA-4gc7-5j7h-4qph","Warn: Project is vulnerable to: GHSA-4wp7-92pw-q264","Warn: Project is vulnerable to: GHSA-g5mm-vmx4-3rg7","Warn: Project is vulnerable to: GHSA-4487-x383-qpph","Warn: Project is vulnerable to: GHSA-f26x-pr96-vw86","Warn: Project is vulnerable to: GHSA-ffvq-7w96-97p7","Warn: Project is vulnerable to: GHSA-g8hw-794c-4j9g","Warn: Project is vulnerable to: GHSA-rcpf-vj53-7h2m","Warn: Project is vulnerable to: GHSA-v596-fwhq-8x48","Warn: Project is vulnerable to: GHSA-558x-2xjg-6232","Warn: Project is vulnerable to: GHSA-564r-hj7v-mcr5","Warn: Project is vulnerable to: GHSA-9cmq-m9j5-mvww","Warn: Project is vulnerable to: GHSA-wxqc-pxw9-g2p8"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T19:53:50.602Z","repository_id":57733208,"created_at":"2025-08-18T19:53:50.603Z","updated_at":"2025-08-18T19:53:50.603Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28753426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T10:25:12.305Z","status":"ssl_error","status_checked_at":"2026-01-25T10:25:11.933Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["gazelle","jpa"],"created_at":"2026-01-25T13:30:49.627Z","updated_at":"2026-01-25T13:30:49.688Z","avatar_url":"https://github.com/finefuture.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gazelle \n\n[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)\n\n**JPA** JPA(Java Persistence API)是Sun官方提出的Java持久化规范。它为Java开发人员提供了一种对象/关系映射工具来管理Java应用中的关系数据。\n\n**gazelle** 是一款类似于Spring data jpa的组件，但是它提供了比Spring data jpa更多的功能。它是基于hibernate提供的JPA2.1规范的。\n\n**gazelle提供了事务管理功能，一种是Jpa原生的TransactionManager，一种是植入的springTransactionManager**\n\n**事务测试**\n```java\n    @Transactional(rollbackFor = Exception.class)\n    public void testTX () {\n        shopRepository.delete(\"014A7A16-2297-474D-B3C4-D8F9B9E976A3\");\n        shopRepository.delete(\"1111111111111\");//这里会报错，将回滚\n        GazelleQuery.update(Shop.class)\n                    .setter().set(\"shopName\", \"XXX\").build()\n                    .where().eq(\"id\", \"35847C13-40DE-4885-8FBE-2C1DD39F7860\").build()\n                    .execute();\n    }\n```\n\n#### 快速入门:\n\n##### 工程依赖:\n+ JDK1.7或更高版本\n+ 依赖管理工具: Maven3.x版本/Gradle3.1以上版本\n\n##### [最新版本OSS下载](https://oss.sonatype.org/#nexus-search;quick~io.github.finefuture)\n##### [最新版本Maven中央仓库下载](http://search.maven.org/#search%7Cga%7C1%7Cio.github.finefuture%20gazelle)\n##### Maven依赖:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.finefuture\u003c/groupId\u003e\n    \u003cartifactId\u003egazelle\u003c/artifactId\u003e\n    \u003cversion\u003e2.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### 使用简介 ###\n\n##### 第一步. 咱们先配置gazelle（其实还有一步，先配置EntityManager,最后面的示例项目链接里面有）:\n\n```java\n\n@Configuration\n@EnableGazelleRepository(basePackages = \"org.gra4j.gazelleExample.crud.dao.jpa\")\npublic class GazelleConfiguration {\n\n    @PersistenceContext\n    EntityManager entityManager;\n\n    @Autowired\n    PlatformTransactionManager tx;\n\n    @Bean\n    @PostConstruct\n    public Jpa jpa () {\n        Jpa jpa = new Jpa(entityManager);\n        JpaContext.setEntityManager(entityManager);\n\tJpaContext.setTransactionType(TransactionalType.spring);//TransactionalType.jpa\n\tJpaContext.setSpringTransactionManager(tx);\n        return jpa;\n    }\n\n}\n```\n\n##### 第二步. 其实咱有两种方式运用gazelle 0.0，比如:\n###### 第一种，使用dao层接口的方式(还有@TupleQuery、@Delete、@Update啊之类大家自己发掘啊)：\n\n```java\n\npublic interface ShopRepository extends GazelleRepository\u003cShop, String\u003e {\n\n    @Query(@Where(and   = @And({@Expression(ops = ExpressionOps.eq,key = \"del\"),\n                                @Expression(ops = ExpressionOps.eq,key = \"shopName\")}),\n//                  or    = @Or({@Expression(ops = ExpressionOps.like,key = \"id\",value = \"%BC85\"),\n//                               @Expression(ops = ExpressionOps.in)}),\n                  order = @Order(asc = \"createTime\"),\n                  check = {CheckOps.checkNullValue, CheckOps.checkEmptyValue}))\n    List\u003cShop\u003e find (@ExpParam Object del, @ExpParam Object shopName,\n                     @PageParam(PageType.first) int first);\n\n    @SqlQuery(value = \"select * from shop where del=:del order by create_time limit 10\", isNative = true, result = Shop.class)\n    List\u003cShop\u003e find (@ExpParam(\"del\") Integer del);\n\n    @Update(set = {\"shopName\"},where = @Where(and = @And(@Expression(ops = ExpressionOps.eq, key=\"shopName\"))))\n    int update(@ExpParam Object shopName, @ModifyParam String name);\n\n}\n```\n\n###### 第二种，使用GazelleQuery（这里面也有很多功能）：\n\n```java\n\npublic List\u003cShop\u003e find () {\n\n        Shop one = (Shop) GazelleQuery.basic(Shop.class).findOne(\"5BD0E7D5-CE2A-4A8A-9261-363BFD928FBD\");\n        System.out.println(one);\n        return GazelleQuery.query().nativeQuery(\"select * from Shop limit 10\", Shop.class);\n//        return GazelleQuery.basic(Shop.class).findAll();\n//        Shop save = (Shop) GazelleQuery.basic(Shop.class).save(new Shop());\n//        return GazelleQuery.select(Shop.class).list();\n    }\n```\n\n##### [示例代码](https://github.com/finefuture/gazelle-example)\n\n#### 其他\n- qq交流群: 634217275\n- 邮件交流: 1120170646@qq.com\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinefuture%2Fgazelle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinefuture%2Fgazelle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinefuture%2Fgazelle/lists"}