All Projects → scofier → SimpleCurd

scofier / SimpleCurd

Licence: other
2个类,实现类ActiveRecord,无需写Mapper, mybatis增强

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to SimpleCurd

Awesome Python Models
A curated list of awesome Python libraries, which implement models, schemas, serializers/deserializers, ODM's/ORM's, Active Records or similar patterns.
Stars: ✭ 124 (+785.71%)
Mutual labels:  activerecord, mapper
random-jpa
Create random test data for JPA/Hibernate entities.
Stars: ✭ 23 (+64.29%)
Mutual labels:  jpa, entity
Activejpa
A simple active record pattern library in java that makes programming DAL easier
Stars: ✭ 172 (+1128.57%)
Mutual labels:  activerecord, jpa
Batmap
🦇 Convention-based, fast object mapper.
Stars: ✭ 210 (+1400%)
Mutual labels:  mapper, entity
shik
shik项目基于springcloud微服务搭建的分布式项目。搭建了shik-config云公共配置,通过shik-RA服务注册发现各个模块,通过shik-zuul路由转发与统一接口。并整合了包括mybatis,jpa,jedis,quartz,freemarker和layui等多个模块,支持spring-session二级域名共享session,使用了RESTful方式提供api接口
Stars: ✭ 89 (+535.71%)
Mutual labels:  jpa, mybatis
active-persistence
Active Persistence is a implementation of Active Record Query Interface for JPA that makes it easy and fun.
Stars: ✭ 14 (+0%)
Mutual labels:  activerecord, jpa
polymorphia
A very fast POJO codec for MongoDB (used in conjunction with the Mongo Java Driver) that handles generic types as well as polymorphic class hierarchies
Stars: ✭ 21 (+50%)
Mutual labels:  mapper, entity
Genesis
Spring cloud Example
Stars: ✭ 83 (+492.86%)
Mutual labels:  mapper, mybatis
p mybatis
mybatis深入学习代码文档以及源码解析,包含通用mapper、分页等插件的详细介绍以及使用
Stars: ✭ 22 (+57.14%)
Mutual labels:  mapper, mybatis
Neo
Orm框架:基于ActiveRecord思想开发的至简化的java的Orm框架
Stars: ✭ 35 (+150%)
Mutual labels:  activerecord, mybatis
Spring Boot Seed
SpringBoot骨架项目,集成SpringBoot、Mybatis、Druid、Mapper、PageHelper、Redis、Shiro、Swagger2、Log4j2等技术
Stars: ✭ 204 (+1357.14%)
Mutual labels:  mapper, mybatis
LazyREST
基于Sping全家桶实现的极速产出RESTful类接口脚手架
Stars: ✭ 21 (+50%)
Mutual labels:  jpa, mybatis
Okhelper Service
OK帮 云进销存 (SpringBoot Restful 全家桶)
Stars: ✭ 146 (+942.86%)
Mutual labels:  mapper, mybatis
Datamappify
Compose, decouple and manage domain logic and data persistence separately. Works particularly great for composing form objects!
Stars: ✭ 338 (+2314.29%)
Mutual labels:  activerecord, entity
Ourbatis
Enhancement tools that make the development of Mybatis easier.
Stars: ✭ 84 (+500%)
Mutual labels:  mapper, mybatis
MiniDao
An powerful enhanced toolkit of SpringJdbc for simplify development
Stars: ✭ 200 (+1328.57%)
Mutual labels:  jpa, mybatis
Mapper
Mybatis Common Mapper - Easy to use
Stars: ✭ 6,680 (+47614.29%)
Mutual labels:  mapper, mybatis
Spring Boot Api Project Seed
🌱🚀一个基于Spring Boot & MyBatis的种子项目,用于快速构建中小型API、RESTful API项目~
Stars: ✭ 8,979 (+64035.71%)
Mutual labels:  mapper, mybatis
springboot-learning-demo
springboot学习示例
Stars: ✭ 17 (+21.43%)
Mutual labels:  jpa, mybatis
spring-boot-examples
本仓库为《Spring Boot 系列文章》代码仓库,欢迎点赞、收藏。
Stars: ✭ 52 (+271.43%)
Mutual labels:  jpa, mybatis

前言

使用Mybatis,通常需要写Entity,Mapper(java、xml),对于小项目很麻烦,有没有只写Entity就可以进行CURD呢?答案是肯定的。

我们的需求

1、只写少量代码,实现CURD
2、拥有Wrapper增强
3、无缝兼容原有的Mapper
4、再包含通用Mapper?

实现结果

上述需求可以完全满足,而且只需要2个类就搞定上面的需求

1、只需要定义一个 pojo ,就可以完成CURD

@Table(name = "user")
public class User {
    String id;
    String name;
    String phone;
}

2、类似baseMapper使用,直接注入(无需写UserMapper)

@Resource
BaseMapper<User> userBaseMapper;

3、简单Wrapper

User user = new User();
Dal.with(User.class).select(user);

4、实现动态SQL查询

User user = new User();
Dal.with(User.class).query(sql -> sql.SELECT("id,name").WHERE("name=#{name}"), user);

项目代码

├── java
│   └── com
│       └── demo
│           ├── SimpleCurdApplication.java
│           ├── core
│           │   ├── BaseMapper.java
│           │   ├── Dal.java
│           │   └── SpringUtil.java
│           └── web
│               ├── SimpleCurdController.java
│               └── User.java
└── resources
    └── application.yml

代码

https://github.com/scofier/SimpleCurd

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].