Ewa
Generator of Model, Repository and Service for Spring Boot + sql2o
Install / Use
/learn @Marco-Sulla/EwaREADME
EWA
Generator of Java code for Spring Boot + sql2o projects.
It auto generates, from a database table:
- Model
- Repository
- Service
- Aggregate
Features
findmethods have an optionalfields_to_ignoreparameter, to filter fields in SELECTs- All methods are overloaded with a method with transaction and a method without transaction, if you don't need it
- Method
findByModel(), to SELECT from database matching fields populated in model. No need to createfindBySomefield() - Similar method
deleteByModel() save()method, that first checks for row existance, and then callinsert()orupdate()exclude_nullsoptional parameter forupdate(), that does not update fields that are nulls- Support for tables with primary key with multiple fields
- Basic SELECT sql, centralized for all
findmethods. Update it and allfindmethods will be updated Servicemethods returns aAggregateobject, with the model as one of the attributesServicehas anenrich()stub method, for augmenting theAggregateandList<Aggregate>objects returned byServicemethodss. AllServicemethods created by EWA callsenrich()by default.- SELECT methods prefix is configurable. You can use "find", "get", "givePapa" or whatever you want
- Configurable indentation style
Install
See INSTALL.TXT . You can download the program at Releases.
Use
- Open a cmd or a shell
- Go to the folder where you extracted EWA
- Go to
srcfolder - Copy
config_example.iniin another .ini file, and edit it following its comments - If you have Linux, you have to source
oracle_env.sh. See ORACLE.txt for more details - Launch in the shell:
> python3 ewa.py --config YOUR_CONFIG.ini. If you have Windows, usepythoninstead ofpython3 - Read and follow the instructions at the end of script launching
Tested databases
Oracle 12C+, MSSQL 2012+. Not all field types are currently supported. Please open an issue if you want me to add one.
Untested, but potentially working databases
I'm using sqlalchemy, so in teory I can support any database that it supports. If you want to add a database, please open an issue.
License
See LICENSE
Related Skills
feishu-drive
339.3k|
things-mac
339.3kManage Things 3 via the `things` CLI on macOS (add/update projects+todos via URL scheme; read/search/list from the local Things database)
clawhub
339.3kUse the ClawHub CLI to search, install, update, and publish agent skills from clawhub.com
yu-ai-agent
2.0k编程导航 2025 年 AI 开发实战新项目,基于 Spring Boot 3 + Java 21 + Spring AI 构建 AI 恋爱大师应用和 ReAct 模式自主规划智能体YuManus,覆盖 AI 大模型接入、Spring AI 核心特性、Prompt 工程和优化、RAG 检索增强、向量数据库、Tool Calling 工具调用、MCP 模型上下文协议、AI Agent 开发(Manas Java 实现)、Cursor AI 工具等核心知识。用一套教程将程序员必知必会的 AI 技术一网打尽,帮你成为 AI 时代企业的香饽饽,给你的简历和求职大幅增加竞争力。
