https://github.com/jesperancinha/jeorg-spring-test-drives
This project is intended as a study tool for the Spring Framework. This includes Spring and Spring Boot. It includes Java and Kotlin implementations. It is also a source of Mockk, Kotest and Jupiter 5 combined examples.
https://github.com/jesperancinha/jeorg-spring-test-drives
java java11 java11-spring-boot java19 java8 jdk19 kotest kotlin kotlin-library mockk modularity pivotal spring spring-boot spring-data spring-mvc spring-security spring5
Last synced: 3 months ago
JSON representation
This project is intended as a study tool for the Spring Framework. This includes Spring and Spring Boot. It includes Java and Kotlin implementations. It is also a source of Mockk, Kotest and Jupiter 5 combined examples.
- Host: GitHub
- URL: https://github.com/jesperancinha/jeorg-spring-test-drives
- Owner: jesperancinha
- License: apache-2.0
- Created: 2019-10-30T17:36:28.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-07-10T08:19:49.000Z (3 months ago)
- Last Synced: 2025-07-10T11:59:14.516Z (3 months ago)
- Topics: java, java11, java11-spring-boot, java19, java8, jdk19, kotest, kotlin, kotlin-library, mockk, modularity, pivotal, spring, spring-boot, spring-data, spring-mvc, spring-security, spring5
- Language: Java
- Homepage: http://joaofilipesabinoesperancinha.nl/
- Size: 7.06 MB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring Test Drives
---
[](https://github.com/jesperancinha/jeorg-spring-test-drives)
[](https://www.apache.org/licenses/LICENSE-2.0)[](https://circleci.com/gh/jesperancinha/jeorg-spring-test-drives)
[](https://ci.appveyor.com/project/jesperancinha/jeorg-spring-test-drives)
[](https://github.com/jesperancinha/jeorg-spring-test-drives/actions/workflows/jeorg-spring-test-drives.yml)[](https://www.codacy.com/gh/jesperancinha/jeorg-spring-test-drives/dashboard?utm_source=github.com&utm_medium=referral&utm_content=jesperancinha/jeorg-spring-test-drives&utm_campaign=Badge_Grade)
[](https://codebeat.co/projects/github-com-jesperancinha-jeorg-spring-test-drives-master)
[](https://snyk.io/test/github/jesperancinha/jeorg-spring-test-drives)[](https://www.codacy.com/gh/jesperancinha/jeorg-spring-test-drives/dashboard?utm_source=github.com&utm_medium=referral&utm_content=jesperancinha/jeorg-spring-test-drives&utm_campaign=Badge_Coverage)
[](https://coveralls.io/github/jesperancinha/jeorg-spring-test-drives?branch=master)
[](https://codecov.io/gh/jesperancinha/jeorg-spring-test-drives)[](#)
[](#)
[](#)## Technologies used
Please check the [TechStack.md](TechStack.md) file for details.
## Description
SPRING study project.
The purpose of this project is to keep up with the development of the Spring Framework
See [Log Book](./LogBook.md) for further details.
#### Stable releases
- [0.0.0](https://github.com/jesperancinha/jeorg-spring-test-drives/tree/0.0.0) - [d8700ab7d597fb825cbfc1fca30c2153ef5141ea](https://github.com/jesperancinha/jeorg-spring-test-drives/tree/0.0.0) - Spring boot 2.7.0 / JDK 11
- [1.0.0](https://github.com/jesperancinha/jeorg-spring-test-drives/tree/1.0.0) - [395d79e218595e57365c7ad9723c2aa20ad77881](https://github.com/jesperancinha/jeorg-spring-test-drives/tree/1.0.0) - Spring boot 2.7.5 / JDK 17
- [2.0.0](https://github.com/jesperancinha/jeorg-spring-test-drives/tree/2.0.0) - [179ec86df1033b9d551621173751bd60590da775](https://github.com/jesperancinha/jeorg-spring-test-drives/tree/2.0.0) - Spring boot 3.0.0 / JDK 17
- [3.0.0](https://github.com/jesperancinha/jeorg-spring-test-drives/tree/3.0.0) - [49d0d3863ff7079c473b2a8bfe285c7735a71f9c](https://github.com/jesperancinha/jeorg-spring-test-drives/tree/3.0.0) - Spring boot 3.0.2 / JDK 19## Contents
1. [Spring](./jeorg-spring-5) - Test drives for the Spring 5 Frawework (Bare minimum focus given to Spring Boot)
2. [Spring Kotlin](./jeorg-spring-kotlin-5) - Test drives for the Spring 5 Frawework in Kotlin (Bare minimum focus given to Spring Boot)
3. [Spring XML based services](./xml-based-services) - A collection of old services still based one way or the other on xml.## Specs
1. Spring: [org.springframework](https://mvnrepository.com/artifact/org.springframework/) - Latest version
2. Spring Boot: [org.springframework.boot/spring-boot-starter-parent](https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent) - Latest version## Build
Note that if you want to build this project from the root, you need to use one of the JDK 11 or upper versions.
See [Hints&Tricks](https://github.com/jesperancinha/project-signer/blob/master/project-signer-templates/Hints%26Tricks.md)
document for more details
```bash
mvn clean install -Dconsolerizer.show=false
```## Install JDK using [SDK-MAN](https://sdkman.io/)
1. List all Java versions and select the appropriate on currently used in the project. Check the [pom.xml](pom.xml) file for details.
```shell
sdk list java
```2. Install the java version
```shell
sdk install java
```3. Use the JDK version
```shell
sdk use java
```## Detect Non-Running Tests
```bash
mvn clean install | egrep "Tests run|----"
```
## Sequence Diagram```mermaid
sequenceDiagram
participant USER
participant SPRING
participant Spring Professional
rect rgb(1,130,25)
USER->>SPRING: User studies spring
SPRING->>Spring Professional: User becomes
loop Keep updated
Spring Professional->>SPRING: User studies again
end
end
```Note: You need a Mermaid plugin extension
i.e. [mermaid-plugin](https://chrome.google.com/webstore/detail/mermaid-diagrams/phfcghedmopjadpojhmmaffjmfiakfil/related)
## Tech-stack Cloud
`@Transational timeout`, `TestRestTemplate`, `HealthIndicator`, `actuator`, `Embedded`, `JPA`, `Big Data`
## Running unit and integration tests
The examples presented in this repo need to use a docker-engine/docker-machine in order to run.
This is because they make use of the [testcontainers](https://www.testcontainers.org/) project.
I tested this using Docker Desktop for mac and on an ubuntu-unity machine. As long as the docker-machine/docker-engine is running, the maven build shoud also work.
Using embedded alternatives revealed to be quite cumbersome, inefficient and slow.
For more info on docker desktop please check their [website](https://www.docker.com/).
For learning how to install docker in ubuntu please check their [website](https://docs.docker.com/engine/install/ubuntu/).
When this is ready, just run:
```shell
make build
```or
```shell
mvn clean install
```## Resources
### Online
- [How to test the REST Clients of your Spring Boot Application with @RestClientTest](https://jschmitz.dev/posts/how_to_test_the_rest_clients_of_your_spring_boot_application_with_restclienttest/)
- [Introduction to OpenRewrite](https://docs.openrewrite.org/)### Books
- Cosmina, I. (11th December 2019). Pivotal Certified Professional Core Spring 5 Developer Exam: A Study Guide Using Spring Framework 5. (Second Edition). Apress
- Sharma, R. (September 2018). Hands-On Reactive Programming with Reactor. (First Edition). Packt
- Cosmina, I. Harrop, R. Schaefer, C. Ho, C. (October 2017). Pro Spring 5 An In-Depth Guide to the Spring Framework and Its Tools. (Fifth Edition). Apress
- Winch, R. Mularien, P. (December 2012). Spring Security 3.1. (Second Edition). Packt Publishing
- Kurniawan, B. Deck, P. (January 2015). Servlet, JSP & Spring MVC. (First Edition). Brainy Software
- Long, J. (2020). Reactive Spring. (First Edition). Josh Long### Online
- [What’s new in Spring Framework 5](https://developer.ibm.com/languages/java/tutorials/j-whats-new-in-spring-framework-5-theedom)
- [Spring Framework Overview](https://docs.spring.io/spring-framework/docs/5.1.18.RELEASE/spring-framework-reference/overview.html)
- [Spring Framework Documentation - Current Version](https://docs.spring.io/spring-framework/docs/current/reference/html/index.html)## About me
[](https://github.com/jesperancinha)