RepoPilotOpen in app →

zouzg/mybatis-generator-gui

mybatis-generator界面工具,让你生成代码更简单更快捷

Concerns

Stale and unlicensed — last commit 2y ago

weakest axis
Use as dependencyConcerns

no license — legally unclear; last commit was 2y ago…

Fork & modifyConcerns

no license — can't legally use code; no CI workflows detected

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isConcerns

no license — can't legally use code; last commit was 2y ago…

  • 18 active contributors
  • Tests present
  • Stale — last commit 2y ago
Show all 6 evidence items →
  • Concentrated ownership — top contributor handles 51% of recent commits
  • No license — legally unclear to depend on
  • No CI workflows detected
What would change the summary?
  • Use as dependency ConcernsMixed if: publish a permissive license (MIT, Apache-2.0, etc.)
  • Fork & modify ConcernsMixed if: add a LICENSE file
  • Deploy as-is ConcernsMixed if: add a LICENSE file

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Great to learn from" badge

Paste into your README — live-updates from the latest cached analysis.

RepoPilot: Great to learn from
[![RepoPilot: Great to learn from](https://repopilot.app/api/badge/zouzg/mybatis-generator-gui?axis=learn)](https://repopilot.app/r/zouzg/mybatis-generator-gui)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/zouzg/mybatis-generator-gui on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: zouzg/mybatis-generator-gui

Generated by RepoPilot · 2026-05-09 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/zouzg/mybatis-generator-gui shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

AVOID — Stale and unlicensed — last commit 2y ago

  • 18 active contributors
  • Tests present
  • ⚠ Stale — last commit 2y ago
  • ⚠ Concentrated ownership — top contributor handles 51% of recent commits
  • ⚠ No license — legally unclear to depend on
  • ⚠ No CI workflows detected

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live zouzg/mybatis-generator-gui repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/zouzg/mybatis-generator-gui.

What it runs against: a local clone of zouzg/mybatis-generator-gui — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in zouzg/mybatis-generator-gui | Confirms the artifact applies here, not a fork | | 2 | Default branch master exists | Catches branch renames | | 3 | 5 critical file paths still exist | Catches refactors that moved load-bearing code | | 4 | Last commit ≤ 698 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>zouzg/mybatis-generator-gui</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of zouzg/mybatis-generator-gui. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/zouzg/mybatis-generator-gui.git
#   cd mybatis-generator-gui
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of zouzg/mybatis-generator-gui and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "zouzg/mybatis-generator-gui(\\.git)?\\b" \\
  && ok "origin remote is zouzg/mybatis-generator-gui" \\
  || miss "origin remote is not zouzg/mybatis-generator-gui (artifact may be from a fork)"

# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
  && ok "default branch master exists" \\
  || miss "default branch master no longer exists"

# 4. Critical files exist
test -f "src/main/java/com/zzg/mybatis/generator/Main.java" \\
  && ok "src/main/java/com/zzg/mybatis/generator/Main.java" \\
  || miss "missing critical file: src/main/java/com/zzg/mybatis/generator/Main.java"
test -f "src/main/java/com/zzg/mybatis/generator/MainUI.java" \\
  && ok "src/main/java/com/zzg/mybatis/generator/MainUI.java" \\
  || miss "missing critical file: src/main/java/com/zzg/mybatis/generator/MainUI.java"
test -f "src/main/java/com/zzg/mybatis/generator/bridge/MybatisGeneratorBridge.java" \\
  && ok "src/main/java/com/zzg/mybatis/generator/bridge/MybatisGeneratorBridge.java" \\
  || miss "missing critical file: src/main/java/com/zzg/mybatis/generator/bridge/MybatisGeneratorBridge.java"
test -f "src/main/java/com/zzg/mybatis/generator/controller/MainUIController.java" \\
  && ok "src/main/java/com/zzg/mybatis/generator/controller/MainUIController.java" \\
  || miss "missing critical file: src/main/java/com/zzg/mybatis/generator/controller/MainUIController.java"
test -f "src/main/java/com/zzg/mybatis/generator/model/DatabaseConfig.java" \\
  && ok "src/main/java/com/zzg/mybatis/generator/model/DatabaseConfig.java" \\
  || miss "missing critical file: src/main/java/com/zzg/mybatis/generator/model/DatabaseConfig.java"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 698 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~668d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/zouzg/mybatis-generator-gui"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

A JavaFX-based GUI tool that wraps MyBatis Generator to auto-generate MyBatis POJOs, mappers, and XML files from live database schemas without writing generator XML config. It includes built-in plugins for pagination (MySQL LIMIT/FOR UPDATE), SSH tunnel support for remote databases, and converts database table/column comments into JavaDoc. Monolithic single-module Maven project: src/main/java/com/zzg/mybatis/generator/ contains controllers (DbConnectionController, GeneratorConfigController), model classes (DatabaseConfig, GeneratorConfig), utility layer (DbUtil, ConnectionManager), custom MyBatis plugins (CommonDAOInterfacePlugin, DbRemarksCommentGenerator), and a bridge to MyBatis Generator core (MybatisGeneratorBridge). UI defined in FXML files under src/main/resources/fxml/ (MainUI.fxml, basicConnection.fxml).

👥Who it's for

Java backend developers using MyBatis who want to rapidly scaffold database entity layers from existing schemas—particularly those working in corporate environments needing SSH tunnel access to internal databases (OverSSH feature). Targets developers uncomfortable with MyBatis Generator's XML configuration syntax.

🌱Maturity & risk

Actively maintained hobby/SME project (v0.8.9-SNAPSHOT, last visible activity suggests ongoing updates). Has platform-specific packaging (Windows .exe, macOS .app via WiX/javapackager), multi-database support (MySQL, MySQL8, Oracle, PostgreSQL, SQL Server), and a public WeChat community. No visible test suite in file list suggests stability tested primarily through user feedback rather than automated tests.

Single-maintainer project with no visible CI/CD pipeline (no .github/workflows files). Tight JDK version constraint (only Java 8 u60+ or Java 11 LTS) limits deployment flexibility. Dependencies on older libraries (logback 1.2.0, commons-lang3 3.4, sqlite-jdbc 3.8.11.2) suggest infrequent updates. Risk of abandoned development—verify recent commit history before adopting for new production work.

Active areas of work

No specific PR/issue backlog visible in provided data. Project appears in maintenance mode with occasional feature additions (SSH support already implemented, search feature added per README). Focus seems to be on stability and community support via DingTalk (钉钉 group 35412531) rather than active feature development.

🚀Get running

git clone https://github.com/zouzg/mybatis-generator-gui
cd mybatis-generator-gui
mvn clean install
mvn javafx:run

Or run via IDE: open src/main/java/com/zzg/mybatis/generator/MainUI.java and execute as JavaFX application (requires JavaFX SDK on JDK 8.0.60+ or Java 11).

Daily commands: Option 1 (IDE): Open project in IntelliJ IDEA or Eclipse, locate com.zzg.mybatis.generator.MainUI, run as Java application. Option 2 (Maven JAR): mvn jfx:jar then java -jar target/jfx/app/mybatis-generator-gui.jar. Option 3 (Native binary): mvn jfx:native (requires WiX 3+ on Windows) outputs .exe/.app in target/jfx/native/.

🗺️Map of the codebase

  • src/main/java/com/zzg/mybatis/generator/Main.java — Application entry point; all contributors must understand how the JavaFX application initializes and loads the main UI.
  • src/main/java/com/zzg/mybatis/generator/MainUI.java — Primary JavaFX stage setup; defines the root window and FXML loader configuration that every UI feature depends on.
  • src/main/java/com/zzg/mybatis/generator/bridge/MybatisGeneratorBridge.java — Core bridge to MyBatis Generator framework; handles code generation logic and orchestrates all generator plugins.
  • src/main/java/com/zzg/mybatis/generator/controller/MainUIController.java — Main controller connecting UI interactions to business logic; routes user actions to database connection and generator flows.
  • src/main/java/com/zzg/mybatis/generator/model/DatabaseConfig.java — Core data model persisting database connection settings; essential for understanding how connections are stored and retrieved.
  • src/main/java/com/zzg/mybatis/generator/model/GeneratorConfig.java — Core data model for code generation configuration; defines what settings users configure and how they're applied during generation.
  • src/main/java/com/zzg/mybatis/generator/util/DbUtil.java — Database utility layer for JDBC operations; all database queries and metadata retrieval depend on this class.

🛠️How to make changes

Add Support for a New Database Type

  1. Add a new enum value in DbType.java (e.g., DB_MARIADB) with its driver class name (src/main/java/com/zzg/mybatis/generator/model/DbType.java)
  2. Add the corresponding JDBC driver JAR to resources/lib/ directory (src/main/resources/lib/)
  3. Update DbUtil.loadDriver() to handle the new database type's driver loading logic (src/main/java/com/zzg/mybatis/generator/util/DbUtil.java)
  4. Add test cases for the new database type's connection and metadata queries (src/test/java/com/zzg/mybatis/generator/util/)
  5. If schema/catalog queries differ, update DbUtil's getSchemas() or getTables() methods (src/main/java/com/zzg/mybatis/generator/util/DbUtil.java)

Add a New Generator Plugin

  1. Create a new Java class extending org.mybatis.generator.api.Plugin in the plugins directory (src/main/java/com/zzg/mybatis/generator/plugins/)
  2. Implement the plugin methods (e.g., preBuildingModelClassFile, modelFieldGenerated) to customize generation (src/main/java/com/zzg/mybatis/generator/plugins/)
  3. Add the plugin to MybatisGeneratorBridge.addPlugins() method and make it configurable (src/main/java/com/zzg/mybatis/generator/bridge/MybatisGeneratorBridge.java)
  4. If the plugin has UI options, add a checkbox or input field in GeneratorConfigController FXML (src/main/resources/fxml/generatorConfigs.fxml)
  5. Store the plugin's enabled state in GeneratorConfig model and persist via ConfigHelper (src/main/java/com/zzg/mybatis/generator/model/GeneratorConfig.java)

Add a New Database Connection Configuration Field

  1. Add a new private field and getter/setter in DatabaseConfig.java (src/main/java/com/zzg/mybatis/generator/model/DatabaseConfig.java)
  2. Add a new input field (TextField, CheckBox, etc.) in the connection FXML file (src/main/resources/fxml/basicConnection.fxml)
  3. Bind the FXML input field to DatabaseConfig in DbConnectionController.java (src/main/java/com/zzg/mybatis/generator/controller/DbConnectionController.java)
  4. Update the JDBC connection URL building logic in DbUtil.getConnection() if the new field affects the connection string (src/main/java/com/zzg/mybatis/generator/util/DbUtil.java)
  5. Verify that ConfigHelper persists and loads the new field correctly from SQLite (src/main/java/com/zzg/mybatis/generator/util/ConfigHelper.java)

Add a New UI Tab or Dialog

  1. Create a new .fxml file in resources/fxml/ defining the layout with FXML (src/main/resources/fxml/)
  2. Create a corresponding controller class extending BaseFXController (src/main/java/com/zzg/mybatis/generator/controller/)
  3. Add the controller to the fx:controller attribute in the FXML file (src/main/resources/fxml/)
  4. If it's a new tab, register it in MainUIController.java and update MainUI.fxml TabPane (src/main/java/com/zzg/mybatis/generator/controller/MainUIController.java)
  5. Implement data binding and event handlers in the new controller using JavaFX patterns (src/main/java/com/zzg/mybatis/generator/controller/)

🪤Traps & gotchas

JDK version constraint is strict: Must be Java 8 u60+ OR Java 11 exactly—Java 9, 10, 12+ will fail silently at startup. Chinese input bug: Some systems cannot type in text fields when Chinese IME is active (per README); users must switch to English IME. MyBatis Generator version locked: Hard-coded to v1.3.6 in pom.xml; newer features (e.g., MyBatis 3.5+) won't be available without version bump and testing. No test suite: Changes risk breaking UI workflows without automated coverage. SQLite config path: Local configs stored in SQLite; path may vary by OS (check ConfigHelper.java for actual location).

🏗️Architecture

💡Concepts to learn

  • mybatis/generator — Official MyBatis Generator repository—this GUI is a wrapper around mybatis-generator-core v1.3.6
  • HEIGE-PCloud/JMRH — Alternative MyBatis GUI tool; different approach to solving the same code-generation problem
  • baomidou/mybatis-plus — Modern MyBatis extension with built-in code generation (CodeGenerator); direct competitor offering CLI + annotation-based generation without separate GUI
  • pagehelper/Pagehelper — MyBatis pagination plugin ecosystem—this tool's MySQL LIMIT plugin aims to integrate similar functionality
  • easycode/easycode — IntelliJ IDEA plugin for MyBatis entity/mapper generation; targets same use case but as IDE plugin rather than standalone GUI

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add unit tests for database utility classes (DbUtil, ConnectionManager, DbRemarksCommentGenerator)

The repo lacks unit tests for critical database interaction code. DbUtil.java and ConnectionManager.java handle database connections and metadata retrieval, while DbRemarksCommentGenerator.java processes database remarks into code comments. These are high-risk areas with no visible test coverage. Adding tests would catch regressions when supporting new database types (MySQL, Oracle, PostgreSQL, SQL Server) and ensure the SSH tunnel connection logic works correctly.

  • [ ] Create src/test/java/com/zzg/mybatis/generator/util/DbUtilTest.java with tests for connection validation and metadata extraction
  • [ ] Create src/test/java/com/zzg/mybatis/generator/util/ConnectionManagerTest.java with tests for SSH tunnel creation and connection pooling
  • [ ] Create src/test/java/com/zzg/mybatis/generator/plugins/DbRemarksCommentGeneratorTest.java with tests for comment extraction from various database types
  • [ ] Add test dependencies (JUnit 4+, Mockito, H2 in-memory database) to pom.xml

Add GitHub Actions CI workflow for cross-platform builds and testing

The repo supports multiple platforms (Windows, macOS) and Java versions (8 and 11), but has no CI pipeline visible. This creates risk when contributors submit PRs for database-specific features or platform-specific packaging. A GitHub Actions workflow would validate builds on Java 8/11 and test against multiple databases (using docker containers for MySQL, PostgreSQL, Oracle).

  • [ ] Create .github/workflows/build.yml with matrix strategy for Java 8 and Java 11
  • [ ] Add docker-compose service containers for MySQL, PostgreSQL, and SQLite to test DbUtil and ConnectionManager
  • [ ] Configure maven build steps: clean compile test package
  • [ ] Add artifact upload for Windows (.ico) and macOS (.icns) packaged artifacts

Extract and document database-specific dialect handling from DbUtil into a DialectRegistry pattern

The codebase supports 5 database types (MySQL 5/8, Oracle, PostgreSQL, SQL Server) but likely has scattered type-checking logic in DbUtil.java and plugins. Currently there's no visible abstraction for database-specific behavior (data type mapping, pagination syntax, metadata queries). This makes adding support for a new database (MariaDB, H2, etc.) difficult. Refactoring into a strategy/registry pattern would make the codebase more maintainable and easier for contributors to extend.

  • [ ] Create src/main/java/com/zzg/mybatis/generator/model/DatabaseDialect.java interface with methods for getMetadataQuery(), getPagedQuery(), resolveDataTypes()
  • [ ] Create src/main/java/com/zzg/mybatis/generator/dialect/ package with implementations: MySQLDialect.java, OracleDialect.java, PostgreSQLDialect.java, SQLServerDialect.java, SQLiteDialect.java
  • [ ] Refactor DbUtil.java to use DatabaseDialect via a DialectRegistry based on DbType enum
  • [ ] Add documentation in README.md under a new 'Adding Database Support' section explaining how to implement DatabaseDialect for a new database

🌿Good first issues

  • Add unit tests for DbUtil.java database introspection methods to improve reliability across MySQL, Oracle, PostgreSQL, and SQL Server; currently only manual testing visible
  • Document and add examples for custom plugin development in the src/main/java/com/zzg/mybatis/generator/plugins/ directory—no inline examples exist, only built-in plugins
  • Implement support for Java 17+ LTS versions by testing JavaFX module system compatibility and updating pom.xml java.version property with CI validation

Top contributors

Click to expand

📝Recent commits

Click to expand
  • dde1377 — Merge branch 'sagexueqi-master' (欧闻)
  • 6a58128 — 优化文案显示 (sagexueqi)
  • 83ca602 — fix bug: 数据库连接配置页面NPE (sagexueqi)
  • 408dbce — 针对|结尾的前缀表达式优化 (sagexueqi)
  • 0bea04e — add future: 定制列支持正则匹配分割列名前缀,快速生成不包含列名前缀的Java Property Name (sagexueqi)
  • c9726f2 — fix bug: 嵌套弹出时会发生dialogStage被覆盖的情况 (sagexueqi)
  • ecdb938 — Merge pull request #317 from zouzg/dependabot/maven/ch.qos.logback-logback-classic-1.2.0 (zouzg)
  • 5a2dae8 — Merge pull request #316 from zouzg/dependabot/maven/ch.qos.logback-logback-core-1.2.0 (zouzg)
  • 6f40428 — Bump logback-classic from 1.1.2 to 1.2.0 (dependabot[bot])
  • 44fde54 — Bump logback-core from 1.1.2 to 1.2.0 (dependabot[bot])

🔒Security observations

  • Critical · Outdated MySQL JDBC Drivers with Known Vulnerabilities — src/main/resources/lib/mysql-connector-java-5.1.38.jar, src/main/resources/lib/mysql-connector-java-8.0.11.jar, pom.xml. The project includes mysql-connector-java-5.1.38.jar (from 2015) and mysql-connector-java-8.0.11.jar which contain multiple known CVEs including authentication bypass, information disclosure, and denial of service vulnerabilities. MySQL Connector/J 5.1.x is deprecated and no longer supported. Fix: Update to mysql-connector-java version 8.0.33 or later. Remove the bundled JAR files and rely on Maven dependency management. Test compatibility with the latest driver versions.
  • High · Outdated logback Dependencies with Known CVEs — pom.xml - logback-classic:1.2.0, logback-core:1.2.0. logback-classic and logback-core version 1.2.0 (released 2015) contain multiple known vulnerabilities including CVE-2021-42550 (arbitrary code execution through JNDI). This is a critical logging library used throughout the application. Fix: Update to logback version 1.2.13 or 1.3.x. Verify no breaking changes in the application logging configuration. Test thoroughly after upgrade.
  • High · Outdated Apache Commons Dependencies — pom.xml - commons-beanutils:1.9.2, commons-lang3:3.4, commons-io:[2.7,). commons-beanutils 1.9.2 (2014) contains deserialization vulnerabilities (CVE-2014-0114). commons-lang3 3.4 (2014) and commons-io 2.7 with undefined upper bound are outdated and may have known vulnerabilities. Fix: Update commons-beanutils to 1.9.4+, commons-lang3 to 3.12.0+, and commons-io to 2.11.0+. Review and pin all dependency versions explicitly rather than using version ranges.
  • High · Embedded Database Credentials Risk — src/main/resources/sqlite3.db. The presence of sqlite3.db in src/main/resources suggests an embedded database with potential sensitive data (connection configs, API keys, etc.). If this contains default or shared credentials, it poses a security risk when distributed. Fix: Review sqlite3.db contents for sensitive data. Never commit databases with credentials. Use environment variables or secure configuration management for credentials. Document data initialization procedures for end users.
  • High · Potential SQL Injection in Dynamic Query Construction — src/main/java/com/zzg/mybatis/generator/util/DbUtil.java, src/main/java/com/zzg/mybatis/generator/util/ConnectionManager.java. Database utility classes (DbUtil.java) and connection manager likely construct SQL queries dynamically. Without code review, there's risk of SQL injection when handling user-supplied table/column names in the code generator. Fix: Review DbUtil.java for SQL construction. Use parameterized queries where possible. For metadata queries (table/column names), validate and escape identifiers. Use proper JDBC metadata APIs (DatabaseMetaData) instead of raw SQL when available.
  • Medium · Outdated SQLite JDBC Driver — pom.xml - sqlite-jdbc:3.8.11.2, src/main/resources/lib/sqlite-jdbc-3.19.3.jar. sqlite-jdbc 3.8.11.2 (2015) is significantly outdated. The pom.xml also includes sqlite-jdbc 3.19.3 but declares 3.8.11.2, creating version confusion and potential security gaps. Fix: Update to sqlite-jdbc 3.42.0 or latest stable version. Remove conflicting bundled JAR files. Consolidate to single version managed by Maven.
  • Medium · Plaintext Database Credentials in Configuration — src/main/java/com/zzg/mybatis/generator/model/. DatabaseConfig.java and GeneratorConfig.java likely store database connection credentials. If these are serialized or persisted without encryption (in sqlite3.db), credentials are exposed in plaintext. Fix: undefined

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Concerning signals · zouzg/mybatis-generator-gui — RepoPilot