All Projects → jeecgboot → MiniDao

jeecgboot / MiniDao

Licence: Apache-2.0 license
An powerful enhanced toolkit of SpringJdbc for simplify development

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to MiniDao

Minidao
轻量级JAVA持久层,类似Mybatis一样的用法,基于SpringJdbc实现更轻量
Stars: ✭ 177 (-11.5%)
Mutual labels:  jdbc, jpa, hibernate, mybatis
Micronaut Data
Ahead of Time Data Repositories
Stars: ✭ 352 (+76%)
Mutual labels:  jdbc, jpa, hibernate
Jooq
jOOQ is the best way to write SQL in Java
Stars: ✭ 4,695 (+2247.5%)
Mutual labels:  jdbc, jpa, hibernate
Java Persistence Frameworks Comparison
Comparison of non-JPA SQL mapping frameworks for Java (Jooq, Spring JDBCTemplate, MyBatis, EBean, JDBI, Speedment, sql2o)
Stars: ✭ 213 (+6.5%)
Mutual labels:  jdbc, jpa, mybatis
Easyee
开源 JavaEE 企业级快速开发平台。提供了 Spring Boot, Struts2, Hibernate, MyBatis, Shiro, EasyUI 等技术,包含完整的权限管理系统等。提供自动化代码生成器。 Open source JaveEE enterprise-class rapid development of the basic platform. Integration of Spring Boot, Struts2, Hibernate, MyBatis, Shiro, EasyUI and other technologies, including the integrity of the rights management. Provides an automated code generator.
Stars: ✭ 275 (+37.5%)
Mutual labels:  jpa, hibernate, mybatis
Hibernate Orm
Hibernate's core Object/Relational Mapping functionality
Stars: ✭ 4,806 (+2303%)
Mutual labels:  jdbc, jpa, hibernate
Jplusone
Tool for automatic detection and asserting "N+1 SELECT problem" occurences in JPA based Spring Boot Java applications and finding origin of JPA issued SQL statements in general
Stars: ✭ 91 (-54.5%)
Mutual labels:  jdbc, jpa, hibernate
spring-boot-examples
本仓库为《Spring Boot 系列文章》代码仓库,欢迎点赞、收藏。
Stars: ✭ 52 (-74%)
Mutual labels:  jpa, mybatis, mybatis-plus
springboot-chapter
🚀Spring Boot 2.0基础教程。主流框架整合,实践学习案例。
Stars: ✭ 23 (-88.5%)
Mutual labels:  jpa, mybatis, mybatis-plus
Hibernate Springboot
Collection of best practices for Java persistence performance in Spring Boot applications
Stars: ✭ 589 (+194.5%)
Mutual labels:  jdbc, jpa, hibernate
LPU-Java-2022-1
LPU Java JEE Sessions 2022 Batch 1
Stars: ✭ 30 (-85%)
Mutual labels:  jdbc, hibernate
migrate-Java-EE-app-to-azure
Migrate an existing Java EE workload to Azure
Stars: ✭ 12 (-94%)
Mutual labels:  jdbc, jpa
Java Interview Questions
1000+ Java Interview Questions
Stars: ✭ 212 (+6%)
Mutual labels:  jdbc, hibernate
PECI-Java-MAR-2015
Repositorio del curso de Java de Mar 2015
Stars: ✭ 29 (-85.5%)
Mutual labels:  jdbc, mybatis
itstack-naive-chat-server
💞 《服务端》| 服务端同样使用Netty4.x作为socket的通信框架,同时在服务端使用Layui作为管理后台的页面,并且我们的服务端采用偏向于DDD领域驱动设计的方式与Netty集合,以此来达到我们的框架结构整洁干净易于扩展。同时我们的通信协议也是在服务端进行定义的,并对外提供可引入的Jar包,这样来保证客户端与服务端共同协议下进行通信。
Stars: ✭ 21 (-89.5%)
Mutual labels:  jdbc, mybatis
Spring Petclinic Rest
REST version of the Spring Petclinic sample application
Stars: ✭ 257 (+28.5%)
Mutual labels:  jdbc, hibernate
Watchdog Framework
🍻 「停止维护」基于SpringBoot+Shiro+Mybatis等开发的轻量级管理系统快速开发脚手架
Stars: ✭ 421 (+110.5%)
Mutual labels:  jdbc, mybatis
Ebean
Ebean ORM
Stars: ✭ 1,172 (+486%)
Mutual labels:  jdbc, jpa
Db Util
If you are using JPA and Hibernate, this tool can auto-detect N+1 query issues during testing.
Stars: ✭ 194 (-3%)
Mutual labels:  jdbc, jpa
doc
QuickPerf documentation: https://github.com/quick-perf/doc/wiki/QuickPerf
Stars: ✭ 22 (-89%)
Mutual labels:  jdbc, hibernate

MiniDao

当前最新版本: 1.9.0 (发布日期:20220902)

反馈问题:发现bug请在github 发issue

MiniDao 简介及特征

An powerful enhanced toolkit of SpringJdbc for simplify development

MiniDao 是一款轻量级JAVA持久层框架,基于 SpringJdbc + freemarker 实现,具备Mybatis一样的SQL分离和逻辑标签能力。Minidao产生的初衷是为了解决Hibernate项目,在复杂SQL具备Mybatis一样的灵活能力,同时支持事务同步。

具有以下特征:

  • O/R mapping不用设置xml,零配置便于维护
  • 不需要了解JDBC的知识
  • SQL语句和java代码的分离
  • 只需接口定义,无需接口实现
  • SQL支持脚本语言(强大脚本语言,freemarker语法)
  • 支持与hibernate轻量级无缝集成
  • 支持自动事务处理和手动事务处理
  • 性能优于Mybatis
  • 比Mybatis更简单易用
  • SQL 支持注解方式
  • SQL 支持独立文件方式,SQL文件的命名规则: 类名_方法名; SQL文件更容易定位,方便后期维护,项目越大此优势越明显
  • SQL标签采用Freemarker的基本语法

如何快速集成minidao?

<dependency>
  <groupId>org.jeecgframework</groupId>
  <artifactId>minidao-pe</artifactId>
  <version>1.9.0</version>
</dependency>

技术交流

项目介绍

项目名 中文名 备注
minidao-pe-framework 架构核心包
minidao-code-generate 代码快速生成
minidao-pe-spring-boot-starter spring-boot2 starter
minidao-pe-example 示例代码

支持28种数据库

数据库 支持
MySQL
Oracle、Oracle9i
SqlServer、SqlServer2012
PostgreSQL
DB2、Informix
MariaDB
SQLite、Hsqldb、Derby、H2
达梦、人大金仓、神通
华为高斯、虚谷、瀚高数据库
阿里云PolarDB、PPAS、HerdDB
Hive、HBase、CouchBase

代码体验

1. 接口定义[EmployeeDao.java]

@MiniDao
public interface EmployeeDao {

 @Arguments({ "employee"})
 @Sql("select * from employee")
 List<Map<String,Object>> getAll(Employee employee);

 @Sql("select * from employee where id = :id")
 Employee get(@Param("id") String id);

 @Sql("select * from employee where empno = :empno and  name = :name")
 Map getMap(@Param("empno")String empno,@Param("name")String name);

 @Sql("SELECT count(*) FROM employee")
 Integer getCount();

 int update(@Param("employee") Employee employee);

 void insert(@Param("employee") Employee employee);
 
 @ResultType(Employee.class)
 public MiniDaoPage<Employee> getAll(@Param("employee") Employee employee,@Param("page")  int page,@Param("rows") int rows);

}

2. SQL文件[EmployeeDao_getAllEmployees.sql]

SELECT * FROM employee where 1=1 
<#if employee.age ?exists>
and age = :employee.age
</#if>
<#if employee.name ?exists>
and name = :employee.name
</#if>
<#if employee.empno ?exists>
and empno = :employee.empno
</#if>

3. 接口和SQL文件对应目录

github

4. 测试代码

public class Client {
public static void main(String args[]) {
	BeanFactory factory = new ClassPathXmlApplicationContext("applicationContext.xml");
 		
	EmployeeDao employeeDao = (EmployeeDao) factory.getBean("employeeDao");
	Employee employee = new Employee();
	String id = UUID.randomUUID().toString().replaceAll("-", "").toUpperCase();
	employee.setId(id);
	employee.setEmpno("A001");
	employee.setSalary(new BigDecimal(5000));
	employee.setBirthday(new Date());
	employee.setName("scott");
	employee.setAge(25);
	//调用minidao方法插入
	employeeDao.insert(employee);
}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].