Skip to content

Commit

Permalink
Update READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
wpanas committed Feb 18, 2024
1 parent 0f0db97 commit e8bebdc
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 10 deletions.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,24 @@ All samples are build with [Kotlin](https://kotlinlang.org/), [Gradle](https://g
& [JUnit 5](https://junit.org/junit5/).

👉 If you use JDK 17+ & Spring Boot 3.1+ go straight
to the [simplest project](./spring6-junit5/README.md).
to the [simplest project](./spring6-junit5/README.md).
Other projects use older Spring Boot 2.7 to show
how to use Testcontainers without all great advancements
that since were made. As for now, 2.7 is still commercially supported
until 2025-08-24. I encourage you to update Spring Boot according
to the [official support timeline](https://spring.io/projects/spring-boot#support)
to have the best experience with Testcontainers and what not.

Current tests status is:
[![wpanas](https://github.com/wpanas/testcontainers-examples/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/wpanas/testcontainers-examples/actions/workflows/ci.yml?query=branch%3Amaster)

# Sample projects

- **NEW!** [The simples Spring MVC, JPA on PostgreSQL & local running](./spring6-junit5/README.md)
- [Simplest Spring MVC & JPA based on PostgreSQL](./spring-junit5/README.md)
- [Spring MVC & JPA with Kotest tests](./spring-kotest/README.md)
- [Spring MVC & JPA with configured PostgreSQL local running](./local-db/README.md)
- [Spring Kafka with configured local running](./kafka/README.md)
- **NEW!** [[Spring Boot 3.1+]: The simplest Spring MVC, JPA on PostgreSQL & local running](./spring6-junit5/README.md)
- [[Spring Boot 2.7]: MVC & JPA with PostgreSQL](./spring-junit5/README.md)
- [[Spring Boot 2.7]: MVC & JPA with Kotest tests](./spring-kotest/README.md)
- [[Spring Boot 2.7]: MVC & JPA with PostgreSQL & local running](./local-db/README.md)
- [[Spring Boot 2.7]: Kafka with local running](./kafka/README.md)

# How to use it?

Expand Down
15 changes: 14 additions & 1 deletion kafka/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,17 @@ repository's main directory and run:

```shell script
./gradlew kafka:bootLocalRun
```
```

## How can you achieve it on your own?

```groovy
tasks.register<JavaExec>("bootLocalRun") {
dependsOn("testClasses")
description = "It allows to boot app locally with Testcontainers"
group = "application"
classpath = project.the<SourceSetContainer>()["test"].runtimeClasspath
mainClass.set("com.github.wpanas.spring.kafka.LocalKafkaApplicationKt")
}
```
Change the `mainClass` and you're ready to go.
2 changes: 1 addition & 1 deletion local-db/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ internal class CatControllerTest {

```kotlin
dependencies {
testImplementation(platform("org.testcontainers:testcontainers-bom:1.15.2"))
testImplementation(platform("org.testcontainers:testcontainers-bom:1.19.5"))
testImplementation("org.testcontainers:postgresql")
}
```
Expand Down
2 changes: 1 addition & 1 deletion spring-junit5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal class CatControllerTest {

```kotlin
dependencies {
implementation(platform("org.testcontainers:testcontainers-bom:1.15.2"))
implementation(platform("org.testcontainers:testcontainers-bom:1.19.5"))
testImplementation("org.testcontainers:junit-jupiter")
testImplementation("org.testcontainers:postgresql")
}
Expand Down
2 changes: 1 addition & 1 deletion spring6-junit5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal class CatControllerTest {

```kotlin
dependencies {
implementation(platform("org.testcontainers:testcontainers-bom:1.15.2"))
implementation(platform("org.testcontainers:testcontainers-bom:1.19.5"))
testImplementation("org.springframework.boot:spring-boot-testcontainers")
testImplementation("org.testcontainers:junit-jupiter")
testImplementation("org.testcontainers:postgresql")
Expand Down

0 comments on commit e8bebdc

Please sign in to comment.