jSqlBox 4.0.1 release, Java database persistence layer tool

 jSqlBox is a full-featured Java database persistence layer tool, the main feature is the excellent infrastructure, small-size, full-featured, basically all database-related operational functions, jSqlBox are provided.  

jSqlBox Java6 and Java8 have released two versions, Home: https://gitee.com/drinkjava2/jsqlbox

This update: 
1. From this version, all dependencies are embedded with a way to integrate the source code in the project, there is no longer any external library dependencies, and released a single jar package about the size of 1M. Although the size looks a bit big, but it provides functionality equivalent to the following main functions of the software combination, it still can be used to describe the short and pithy:

  • DbUtils of JDBC operations
  • Spring's dependency injection and declarative transaction
  • MyBatis entities associated with the query
  • Hibernate DDL generation, dialect database entity CURD         
  • Sharding-JDBC sub-library sub-table
  • Seata distributed transaction (rollback automatically created based on SQL, non-invasive business)   

2. [#IUVVF] dialect database from the original enumerated type to form a normal class, so that the user's own database to add a new dialect, although already comes jSqlBox 80 dialects, but it is possible to add a custom dialects improvements in infrastructure.  
    Dialect use examples:

  • Dialect dialect = Dialect.MySQL57InnoDBDialect; // use the system comes dialect  
  • Dialect myDialect = new Dialect ( "My"); // a new user-defined database dialects, dialect each attribute is empty, the need to manually set   
  • Dialect myDialect = new Dialect ( "Oracle9iDialect"); // manually customize a new dialect to existing "Oracle9iDialect" dialect as a template, you can modify its properties in the individual on the basis of this template  

3. [# I14OUZ] tag and correct problems @Column JPA inconsistent defined in columnDefinition in DDL may contain additional fragments, such as:  

  • @Column (insertable = false, columnDefinition = "timestamp not null default now () comment 'Creation Time' ')
  • java.util.Date d9;

4. [# I11Z5L] Calendar date added mapping entity class, and adds the following seven kinds Java8日期类型的支持:

  • LocalDate mapped JDBC DATE type (specifically generated DDL dialect is also associated with the database, the same below)
  • LocalTime map type to TIME
  • OffsetTime map type to TIME
  • Instant mapped to TIMESTAMP type
  • LocalDateTime mapped to TIMESTAMP type
  • OffsetDateTime map type to JTIMESTAMP
  • ZonedDateTime mapped to TIMESTAMP type

5. Correct the problem in the Oracle database java.util.Date date mapping errors, and adds support for standard JPA annotations @Temporal of. So far, a total of jSqlBox support 15 major JPA annotations (but not including the @ OneToMany, @ ManyToOne notes, because jSqlBox just a lightweight DAO tool, no entity container). 

6. The logging system as a jLogs independent module, which the system uses to determine what the log by reading a configuration file if no profile exists, a default log to the console.

7. legacy of SqlBoxContext and JSQLBOX these two classes, because the name is too long is no longer recommended, made a mark on the SqlBoxContext @Depercated class, switch from version 4.0.0 shorter DbContext named and DB.

8. embedded jBeanBox module updated to version 4.0.0, which is only a general IOC 3000 line of source / AOP tool to add the @ Name, @ Qualifier, @ Component annotations, and so on like scanning capabilities (thanks centychen of class -scanner project!).    

Finally, by the way, is divided into two jre6 and jre8 release when jSqlBox released, the previous approach is to Java6 and Java8 in two directories were developed, and start from jSqlBox version 4.0.0, a merger in the source directory principle it is achieved by adding switches to compile source code, the following examples, for example some type of source used Java8 unique to date:
 

    /*- JAVA8_BEGIN */  
       JAVA_TO_TYPE_MAP.put(java.time.LocalDate.class, Type.DATE);
           ....
    /* JAVA8_END */


Normal steps to release, when released in the environment JDK6, released only when the first JDK8 / * - JAVA8_BEGIN * / global replaced with IDE / * - JAVA8_BEGIN, the / * JAVA8_END * / global replaced JAVA8_END * / can be. Although the Java language itself, although this is not supported by the compiler switch, but the comment text and replace the use of the source code can also be easily implemented in different versions of the JDK to compile and publish.   

Guess you like

Origin www.oschina.net/news/113494/jsqlbox-4-0-1-released