Skip to content

Commit 74503e7

Browse files
committed
chore: clean codes
1 parent 9039fbb commit 74503e7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+234
-99
lines changed

boot-kotlin-co-dsl/src/test/kotlin/com/example/demo/ApplicationTests.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ import org.junit.jupiter.api.Test
66
import org.springframework.beans.factory.annotation.Autowired
77
import org.springframework.boot.test.context.SpringBootTest
88
import org.springframework.context.annotation.Import
9+
import org.springframework.test.context.ContextConfiguration
910
import org.springframework.test.web.reactive.server.WebTestClient
1011
import org.springframework.web.reactive.function.server.RouterFunction
1112
import org.springframework.web.reactive.function.server.ServerResponse
1213

13-
@SpringBootTest(
14-
classes = [DemoApplication::class],
15-
properties = ["context.initializer.classes=com.example.demo.TestConfigInitializer"]
16-
)
14+
@SpringBootTest
15+
@ContextConfiguration(initializers = [TestConfigInitializer::class])
1716
@Import(TestcontainersConfiguration::class)
1817
class ApplicationTests {
1918

boot-kotlin-dsl/pom.xml

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
<properties>
1919
<java.version>21</java.version>
2020
<kotlin.version>2.1.0</kotlin.version>
21+
<kotest.version>5.9.1</kotest.version>
22+
<mockk.version>1.13.13</mockk.version>
23+
<springmockk.version>4.0.2</springmockk.version>
2124
</properties>
2225

2326
<dependencies>
@@ -44,7 +47,7 @@
4447
</dependency>
4548
<dependency>
4649
<groupId>org.jetbrains.kotlin</groupId>
47-
<artifactId>kotlin-stdlib-jdk8</artifactId>
50+
<artifactId>kotlin-stdlib</artifactId>
4851
</dependency>
4952
<dependency>
5053
<groupId>org.jetbrains.kotlinx</groupId>
@@ -55,13 +58,61 @@
5558
<groupId>org.springframework.boot</groupId>
5659
<artifactId>spring-boot-starter-test</artifactId>
5760
<scope>test</scope>
61+
<exclusions>
62+
<exclusion>
63+
<groupId>org.mockito</groupId>
64+
<artifactId>mockito-core</artifactId>
65+
</exclusion>
66+
<exclusion>
67+
<groupId>org.mockito</groupId>
68+
<artifactId>mockito-junit-jupiter</artifactId>
69+
</exclusion>
70+
</exclusions>
5871
</dependency>
5972
<dependency>
6073
<groupId>io.projectreactor</groupId>
6174
<artifactId>reactor-test</artifactId>
6275
<scope>test</scope>
6376
</dependency>
77+
<dependency>
78+
<groupId>org.jetbrains.kotlinx</groupId>
79+
<artifactId>kotlinx-coroutines-test</artifactId>
80+
<scope>test</scope>
81+
</dependency>
82+
<dependency>
83+
<groupId>io.kotest</groupId>
84+
<artifactId>kotest-assertions-core-jvm</artifactId>
85+
<version>${kotest.version}</version>
86+
<scope>test</scope>
87+
</dependency>
88+
<dependency>
89+
<groupId>io.mockk</groupId>
90+
<artifactId>mockk-jvm</artifactId>
91+
<version>${mockk.version}</version>
92+
<scope>test</scope>
93+
</dependency>
94+
<dependency>
95+
<groupId>com.ninja-squad</groupId>
96+
<artifactId>springmockk</artifactId>
97+
<version>${springmockk.version}</version>
98+
</dependency>
6499

100+
<dependency>
101+
<groupId>org.springframework.boot</groupId>
102+
<artifactId>spring-boot-testcontainers</artifactId>
103+
<scope>test</scope>
104+
</dependency>
105+
106+
<dependency>
107+
<groupId>org.testcontainers</groupId>
108+
<artifactId>mongodb</artifactId>
109+
<scope>test</scope>
110+
</dependency>
111+
<dependency>
112+
<groupId>org.testcontainers</groupId>
113+
<artifactId>junit-jupiter</artifactId>
114+
<scope>test</scope>
115+
</dependency>
65116
</dependencies>
66117

67118
<build>

boot-kotlin-dsl/src/test/kotlin/com/example/demo/ApplicationTests.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@ import org.junit.jupiter.api.BeforeAll
55
import org.junit.jupiter.api.Test
66
import org.springframework.beans.factory.annotation.Autowired
77
import org.springframework.boot.test.context.SpringBootTest
8+
import org.springframework.test.context.ContextConfiguration
89
import org.springframework.test.web.reactive.server.WebTestClient
910
import org.springframework.web.reactive.function.server.RouterFunction
1011
import org.springframework.web.reactive.function.server.ServerResponse
1112

1213
@SpringBootTest(
1314
classes = [DemoApplication::class],
14-
properties = ["context.initializer.classes=com.example.demo.TestConfigInitializer"]
15+
// removed since Spring Boot 3.4.0
16+
//properties = ["context.initializer.classes=com.example.demo.TestConfigInitializer"]
1517
)
18+
@ContextConfiguration(initializers = [TestConfigInitializer::class])
1619
class ApplicationTests {
1720

1821
@Autowired

docs/README.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/_config.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1-
title: Spring WebFlux By Example
1+
title: Spring Reactive Programming
22
lang: en
33
description: A collection of code snippets and tips of using Spring WebFlux
44

55
# theme
6-
remote_theme: rundocs/jekyll-rtd-theme
7-
8-
# folders sort
9-
readme_index:
10-
with_frontmatter: true
6+
remote_theme: just-the-docs/just-the-docs
117

128
exclude:
139
- Gemfile
1410
- Gemfile.lock
15-
16-
plugins:
17-
- jemoji
18-
- jekyll-avatar
19-
- jekyll-mentions
20-
11+
12+
color_scheme: dark
13+
nav_external_links:
14+
- title: Example Codes on GitHub
15+
url: https://github.com/hantsy/spring-reactive-sample
16+
hide_icon: false # set to true to hide the external link icon - defaults to false
17+
opens_in_new_tab: true # set to true to open this link in a new tab - defaults to false

docs/data/README.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/data/data-cassandra.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
sort: 6
2+
title: Spring Data Cassandra
3+
parent: Rective Data Operations
4+
nav_order: 6
35
---
46

57
# Spring Data Cassandra

docs/data/data-couchbase.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
sort: 7
2+
title: Spring Data Couchbase
3+
parent: Rective Data Operations
4+
nav_order: 7
35
---
46

57
# Spring Data Couchbase

docs/data/data-elasticsearch.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
sort: 8
2+
title: Spring Data ElasticSearch
3+
parent: Rective Data Operations
4+
nav_order: 8
35
---
46

57

docs/data/data-mongo.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
sort: 4
2+
title: Spring Data MongoDb
3+
parent: Rective Data Operations
4+
nav_order: 4
35
---
46

57
# Spring Data Mongo

docs/data/data-neo4j-rx.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
sort: 9
2+
title: Spring Data Neo4j Rx
3+
parent: Rective Data Operations
4+
nav_order: 3
35
---
46

57
# Spring Data Neo4j Rx

docs/data/data-neo4j.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
sort: 2
2+
title: Spring Data Neo4j
3+
parent: Rective Data Operations
4+
nav_order: 2
35
---
46

57
# Spring Data Neo4j

docs/data/data-r2dbc.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
sort: 3
2+
title: Spring Data R2dbc
3+
parent: Rective Data Operations
4+
nav_order: 3
35
---
46

57
# Spring Data R2dbc

docs/data/data-redis.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
sort: 5
2+
title: Spring Data Redis
3+
parent: Rective Data Operations
4+
nav_order: 5
35
---
46

57

docs/data/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: Rective Data Operations
3+
nav_order: 3
4+
---
5+
6+
7+
# Rective Data Operations
8+

docs/data/intro.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
sort: 1
2+
title: An introduction to Spring Data(Reactive)
3+
parent: Rective Data Operations
4+
nav_order: 1
35
---
46

57
# An introduction to Spring Data(Reactive)

docs/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Spring Reactive Programming
3+
layout: home
4+
nav_exclude: true
5+
---
6+
7+
# Spring Reactive Programming

docs/int/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ sort: 6
66
# Spring Integration
77

88
{% include list.liquid all=true %}
9-

docs/int/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Spring Integration
3+
nav_order: 6
4+
---
5+
6+
7+
# Spring Integration

docs/int/intro.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Reactive Streams and Spring Integration
3+
parent: Spring Integration
4+
nav_order: 1
5+
---
6+
7+
# Reactive Streams and Spring Integration
8+
9+
(Place holder)

docs/preface.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sort: 0
2+
nav_order: 0
33
---
44

55
# Preface

docs/security/README.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/security/config-boot.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
sort: 3
2+
title: Configure Spring Security in Spring Boot applications
3+
parent: Spring Security
4+
nav_order: 3
35
---
46

57
# Configure Spring Security in Spring Boot applications

docs/security/config.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
sort: 2
2+
title: Configure Spring Security
3+
parent: Spring Security
4+
nav_order: 2
35
---
46

57
# Configure Spring Security

docs/security/form.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
sort: 6
2+
title: Form based authentication
3+
parent: Spring Security
4+
nav_order: 6
35
---
46

57
# Form based authentication

docs/security/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Spring Security
3+
nav_order: 4
4+
---
5+
6+
7+
# Spring Security
8+
9+

docs/security/method.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
sort: 4
2+
title: Method level constraints
3+
parent: Spring Security
4+
nav_order: 4
35
---
46

57
# Method level constraints

docs/security/start.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
sort: 1
2+
title: An Introduction to Spring Security
3+
parent: Spring Security
4+
nav_order: 1
35
---
46

57
# An Introduction to Spring Security

docs/security/user-details-repo.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
sort: 5
2+
title: Customize UserDetailsRepository
3+
parent: Spring Security
4+
nav_order: 5
35
---
46

57
# Customize UserDetailsRepository

docs/session/README.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/session/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Spring Session
3+
nav_order: 5
4+
---
5+
6+
7+
# Spring Session
8+
9+

0 commit comments

Comments
 (0)