Skip to content

Commit

Permalink
Merge pull request #33 from GuentherJulian/remove_tkit_dependencies
Browse files Browse the repository at this point in the history
Remove tkit dependencies
  • Loading branch information
maybeec authored Dec 1, 2021
2 parents 2a3b793 + a9fdca5 commit a4b13b8
Show file tree
Hide file tree
Showing 14 changed files with 592 additions and 589 deletions.
48 changes: 48 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text eol=lf
*.bat eol=crlf

#
# The above will handle all files NOT found below
#
# These files are text and should be normalized (Convert crlf => lf)
*.asciidoc text
*.adoc text
*.md text
*.css text
*.df text
*.htm text
*.html text
*.java text
*.js text
*.json text
*.jsp text
*.jspf text
*.jspx text
*.properties text
*.sh text
*.tld text
*.txt text
*.tag text
*.tagx text
*.xml text
*.yml text
*.ftl text

# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.class binary
*.dll binary
*.ear binary
*.gif binary
*.ico binary
*.jar binary
*.jpg binary
*.jpeg binary
*.png binary
*.so binary
*.war binary
*.pdf binary
*.exe binary
*.zip binary
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.*
!.github
!.gitignore
!.gitattributes
!.mvn
*.bak
*.log
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ You can run your application in dev mode that enables live coding using:

You can run tests from your IDE or via Maven. Simply run `./mvnw test ` or `./mvnw package`

## Tkit quarkus

Adding tkit libs to our project gives us several new features. Check the logs for example, all our business methods are now logged and timed.
The REST API now handles exceptions gracefully(as JSON response), and we get server side pagination with very little effort.
Our tests are now real integration tests with real postgres DB, and are stuitable for CI envs.

## Access your REST endpoint

Go to http://localhost:8080/animals
Expand Down
60 changes: 23 additions & 37 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,12 @@
<scope>provided</scope>
<version>4.3.1</version>
</dependency>
<!-- Json logging / Enable this if you do not use tkit-json-log -->
<!-- <dependency>-->
<!-- <groupId>io.quarkus</groupId>-->
<!-- <artifactId>quarkus-logging-json</artifactId>-->
<!-- </dependency>-->

<!-- JSON logging -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-logging-json</artifactId>
</dependency>

<!-- Lombok, which does what java should do out of the box -->
<dependency>
Expand Down Expand Up @@ -137,51 +138,36 @@
<scope>provided</scope>
</dependency>

<!-- 1000kit extensions-->
<dependency>
<groupId>org.tkit.quarkus</groupId>
<artifactId>tkit-quarkus-rest</artifactId>
<version>2.4.0</version>
</dependency>
<!-- Business method logger... -->
<dependency>
<groupId>org.tkit.quarkus</groupId>
<artifactId>tkit-quarkus-log-cdi</artifactId>
<version>1.4.5</version>
</dependency>
<!-- REST communication logger.. -->
<!--Testing -->
<dependency>
<groupId>org.tkit.quarkus</groupId>
<artifactId>tkit-quarkus-log-rs</artifactId>
<version>1.4.5</version>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<!-- Extended structured JSON logger -->
<dependency>
<groupId>org.tkit.quarkus</groupId>
<artifactId>tkit-quarkus-log-json</artifactId>
<version>1.4.5</version>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>

<!-- Component level integration tests -->
<dependency>
<groupId>org.tkit.quarkus</groupId>
<artifactId>tkit-quarkus-test</artifactId>
<version>1.12.0</version>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>1.15.2</version>
<scope>test</scope>
</dependency>

<!--Testing -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.15.2</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.15.2</version>
<scope>test</scope>
</dependency>

</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ public abstract class ApplicationPersistenceEntity {
private static final long serialVersionUID = 1L;

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@Version
private Integer modificationCounter;

/**
Expand All @@ -42,7 +43,6 @@ public void setId(Long id) {
this.id = id;
}

@Version
public Integer getModificationCounter() {

return this.modificationCounter;
Expand Down
Loading

0 comments on commit a4b13b8

Please sign in to comment.