com.github.youyinnn:you-db-utils

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

License

License

GroupId

GroupId

com.github.youyinnn
ArtifactId

ArtifactId

you-db-utils
Last Version

Last Version

2.2.3
Release Date

Release Date

Type

Type

jar
Description

Description

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/
Source Code Management

Source Code Management

https://github.com/youyinnn/YouDBUtils

Download you-db-utils

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.youyinnn/you-db-utils/ -->
<dependency>
    <groupId>com.github.youyinnn</groupId>
    <artifactId>you-db-utils</artifactId>
    <version>2.2.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.youyinnn/you-db-utils/
implementation 'com.github.youyinnn:you-db-utils:2.2.3'
// https://jarcasting.com/artifacts/com.github.youyinnn/you-db-utils/
implementation ("com.github.youyinnn:you-db-utils:2.2.3")
'com.github.youyinnn:you-db-utils:jar:2.2.3'
<dependency org="com.github.youyinnn" name="you-db-utils" rev="2.2.3">
  <artifact name="you-db-utils" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.youyinnn', module='you-db-utils', version='2.2.3')
)
libraryDependencies += "com.github.youyinnn" % "you-db-utils" % "2.2.3"
[com.github.youyinnn/you-db-utils "2.2.3"]

Dependencies

compile (3)

Group / Artifact Type Version
cglib : cglib-nodep jar 3.2.5
com.alibaba : druid jar 1.1.8
com.github.youyinnn : you-web-utils jar 1.8.3

provided (3)

Group / Artifact Type Version
org.xerial : sqlite-jdbc jar 3.20.0
mysql : mysql-connector-java jar 6.0.5
com.jfinal : jfinal jar 3.2

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

YouDBUtils

Travis Travis Travis

这是一个“自用”的数据库工具包,你就把它当成orm框架也行 😄

使用

通过maven:

    <dependency>
        <groupId>com.github.youyinnn</groupId>
        <artifactId>you-db-utils</artifactId>
        <version>2.2.3</version>
    </dependency>

特点

  • 拒绝配置文件: 以alibaba的Druid为基础(拒绝DBCP/C3P0),支持代码配置Druid,拒绝配置文件

  • 常规: 仅支持MySQL/SQLite(自用. 轻巧)

  • IOC/DI/Transaction: 类似spring的控制反转,主要用于生成指定包下的DAO类的代理类(依赖cglib),让其具有事务特性,在ioc容器中以类名获取

  • 不忘底层: 提供CRUD的基本操作类SqlExecutor

  • 可直接面向Model: 提供直接面向Model类的操作类ModelHandler,和数据库记录可直接映射对应,无需映射文件(这就需要遵循本人的惯例了

  • 内置log输出: 工具内置log输出,依赖log4j2,并且与用户配置的log4j2.xml完全无缝融合

需要特别声明的是,因为这个工具类是自用的工具类,所以使用了本人所习惯的惯例来减少配置量,所以惯例部分一定要看仔细。


TODO

  • YouController注释,配合Service的自动装配(cancel)
  • 事务的传播行为可选功能待实现(done:只存在PROPAGATION_REQUIRED)
  • 其他重要监控的配置(done:wall默认, stat, log4j2可高度配置)
  • 启动初始化信息的输出(done:基本的启动和业务流)
  • log4j2的引入(done:嵌入)
  • 一级甚至多级缓存
更多详情请移步wiki页了解

Versions

Version
2.2.3
2.2.2
2.2
2.1
1.4
1.3
1.2.2
1.2.1
1.2.0
1.1.3
1.1.2
1.1.1
1.1.0
1.0.2
1.0.1
1.0