Skip to content

michalsomora/tkit-quarkus

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1000kit Quarkus extension

License Release version Quarkus version Supported JVM Versions GitHub Actions Status

All Contributors

Set of Quarkus extensions and libraries to speed up development of backend microservices.

Getting started

Include the following bom artifact into your pom or parent pom and then pick the components you need.

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.tkit.quarkus.lib</groupId>
            <artifactId>tkit-quarkus-bom</artifactId>
            <version>${tkit.quarkus.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Components

Include the component in your project by including the corresponding dependency.

ℹ️ Some component come with additional documentation and configuration - check the 'Documentation' link for particular section.

Name ArtifactId Info Description Documentation
Context tkit-quarkus-context Context propagation helpers used by other extensions like logging or jpa. Link
Data Import tkit-quarkus-data-import Extension for business data import - initial data, mounted import files etc. Link
JPA models tkit-quarkus-jpa-models Base classes for JPA entities, traceable superclass and related classes. Link
JPA DAO tkit-quarkus-jpa > Note: Consider using official Quarkus Panache extension instead. Abstract DAO/Repository superclass and related utilities. Link
Log CDI tkit-quarkus-log-cdi Quarkus extension for CDI method logging(business method start/stop logging). Link
Log RS tkit-quarkus-log-rs Quarkus extension for HTTP request logging (client & server). Link
Log JSON tkit-quarkus-log-json Custom JSON log formatter that provides additional features not included in Official Quarkus json logger. Make sure you only include this if you need those extra features, otherwise use the official extension. Link
Log Rest tkit-quarkus-rest Helper classes for JAX-RS - model mapping, exception handling, DTOs. Link
Test data import tkit-quarkus-test-db-import Test extension for data import from excel into database during unit tests. Link

Migration from older version

If you have used previous versions of tkit quarkus libraries (mvn groupId org.tkit.quarkus) then there are a few breaking changes in this new version, however the migration is straightforward:

  1. Quarkus 2.x Tkit Quarkus libs only support Quarkus version 2. Check the official guide for migration instructions.

  2. Change maven imports Group id of the libraries has changed to org.tkit.quarkus.lib. Also, prefer the use of bom import, to ensure version compatibility. So if your current pom.xml looks sth like this:

<dependencies>
    <dependency>
        <groupId>org.tkit.quarkus</groupId>
        <artifactId>tkit-quarkus-....</artifactId>
    </dependency>
</dependencies>

Change it to:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.tkit.quarkus.lib</groupId>
            <artifactId>tkit-quarkus-bom</artifactId>
            <version>${tkit.quarkus.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
<dependencies>
    <!-- Other dependencies -->
</dependencies>
  1. Update configuration All extensions and libraries now have unified configuration properties structure, starting with tkit. prefix, some keys have been renamed or otherwise updated. Check the table bellow for config property migration:
Old New Note
quarkus.tkit.log.ignore.pattern tkit.log.cdi.auto-discovery.ignore.pattern
quarkus.tkit.log.packages tkit.log.cdi.auto-discovery.packages In order to enable auto binding of logging extension, you must add property tkit.log.cdi.auto-discovery.enabled=true
  1. Default behavior changes

Logging:
CDI logging now only logs end of business methods (success or error) to reduce logging verbosity. If you restore the behavior and still log start method invocations, set the property: tkit.log.cdi.start.enabled=true

Old behavior:

[com.acme.dom.dao.SomeBean] someMethod(param) started
[com.acme.dom.dao.SomeBean] someMethod(param):SomeResultClass finished [0.035s]

[com.acme.dom.dao.SomeBean] (executor-thread-0) someMethod(param) started [0.035s]

New behavior:

[com.acme.dom.dao.SomeBean] someMethod(param):SomeResultClass [0.035s]
  1. Use modificationCount instead of version when working with TraceableEntity. Therefore, annotations like @Mapping(target = "version", ignore = true) should be changed to @Mapping(target = "modificationCount", ignore = true).

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Andrej Petras

💻 🚧

matus

💻 🚧

Alexander Droste

📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Releases

No releases published

Packages

No packages published

Languages

  • Java 99.8%
  • Dockerfile 0.2%