OurbatisMybatis 增強(qiáng)工具
Ourbatis
Introduce
_____ _ _ _____ _____ ___ _____ _ _____
/ _ \ | | | | | _ \ | _ \ / | |_ _| | | / ___/
| | | | | | | | | |_| | | |_| | / /| | | | | | | |___
| | | | | | | | | _ / | _ { / / | | | | | | \___ \
| |_| | | |_| | | | \ \ | |_| | / / | | | | | | ___| |
\_____/ \_____/ |_| \_\ |_____/ /_/ |_| |_| |_| /_____/
讓Mybatis開(kāi)發(fā)更加簡(jiǎn)潔輕松,提供通用的操作方法及自定義入口,讓開(kāi)發(fā)無(wú)XML化,提高工作效率,減少編碼時(shí)間!
Ourbatis的特性:
1、簡(jiǎn)潔方便,可以讓Mybatis無(wú)XML化開(kāi)發(fā)。
2、優(yōu)雅解耦,通用和自定義的SQL標(biāo)簽完全隔離,讓維護(hù)更加輕松。
3、無(wú)侵入性,Mybatis和Ourbatis可同時(shí)使用,配置簡(jiǎn)潔。
4、靈活可控,通用模板可自定義及擴(kuò)展。
5、部署快捷,只需要一個(gè)依賴,兩個(gè)配置,即可直接運(yùn)行。
6、多數(shù)據(jù)源,在多數(shù)據(jù)源環(huán)境下也可以照常使用。
7、項(xiàng)目活躍,Nico也會(huì)在日常開(kāi)發(fā)中使用并優(yōu)化Ourbatis,將會(huì)率先踩坑填坑。
Install
以Spring Boot項(xiàng)目為例,添加一下依賴
<dependency> <groupId>com.smallnico</groupId> <artifactId>ourbatis-spring-boot-starter</artifactId> <version>1.0.5</version> </dependency>
然后配置一下您的實(shí)體類所在的包路徑:
ourbatis.domain-locations=org.nico.ourbatis.domain
如果您想查看Ourbatis啟動(dòng)日志,您可以追加以下配置:
logging.level.org.nico.ourbatis=debug
接下來(lái),您的Mapper只需要繼承SimpleMapper接口即可:
public interface UserMapper extends SimpleMapper<User, Integer>{}
Simple
Wiki
Feedback
郵箱地址[email protected]
評(píng)論
圖片
表情
