Skip to content

Commit 3c7c526

Browse files
authored
Merge pull request #22 from tiarebalbi/dependabot/gradle/infinitic-spring-boot-3-starter/production-dependencies-58e13fbf76
Chore(deps): Bump the production-dependencies group in /infinitic-spring-boot-3-starter with 4 updates
2 parents 9975627 + 1002b20 commit 3c7c526

File tree

5 files changed

+46
-32
lines changed

5 files changed

+46
-32
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ Spring Boot for the Infinitic library, which is designed to orchestrate services
55
on top of Apache Pulsar. With Infinitic, you can easily manage complex scenarios, ensuring that failures don't disrupt
66
your workflows.
77

8+
**Notes:**
9+
10+
- **v1.0.x** is compatible with Infinitic v0.11.6 and Spring Boot 3.1.x
11+
- **v1.1.x** is compatible with Infinitic v0.11.7+ and Spring Boot 3.2.x
12+
813
## Getting Started
914

1015
**Installation:** Add the Infinitic dependency to your pom.xml or build.gradle file.
@@ -14,13 +19,13 @@ your workflows.
1419
<dependency>
1520
<groupId>com.tiarebalbi.infinitic</groupId>
1621
<artifactId>infinitic-spring-boot-3-starter</artifactId>
17-
<version>1.0.1</version>
22+
<version>1.1.0</version>
1823
</dependency>
1924
```
2025

2126
**Gradle (Kotlin)**
2227
```xml
23-
implementation("com.tiarebalbi.infinitic:infinitic-spring-boot-3-starter:1.0.1")
28+
implementation("com.tiarebalbi.infinitic:infinitic-spring-boot-3-starter:1.1.0")
2429
```
2530

2631
Other references here:

infinitic-spring-boot-3-starter/build.gradle.kts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
21
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
32

43

54
plugins {
6-
id("org.springframework.boot") version "3.1.5"
5+
id("org.springframework.boot") version "3.2.0"
76
id("com.github.ben-manes.versions") version "0.50.0"
87

98
id("io.spring.dependency-management") version "1.1.4"
10-
id("org.jlleitschuh.gradle.ktlint") version "11.6.1"
9+
id("org.jlleitschuh.gradle.ktlint") version "12.0.2"
1110
id("org.jetbrains.dokka") version "1.9.10"
12-
kotlin("jvm") version "1.9.20"
13-
kotlin("plugin.spring") version "1.9.20"
11+
kotlin("jvm") version "1.9.21"
12+
kotlin("plugin.spring") version "1.9.21"
1413
`java-library`
1514
`maven-publish`
1615
`signing`
1716
}
1817

1918
group = "com.tiarebalbi.infinitic"
2019
version = "1.0.1"
21-
extra["infiniticVersion"] = "0.11.6"
20+
extra["infiniticVersion"] = "0.11.7"
2221

2322
val bootJar: org.springframework.boot.gradle.tasks.bundling.BootJar by tasks
2423
bootJar.enabled = false
@@ -113,7 +112,12 @@ publishing {
113112
pom {
114113
name = "Infinitic Spring Boot 3 Starter"
115114
description =
116-
"This repository provides an auto-configuration integration with Spring Boot for the Infinitic library, which is designed to orchestrate services distributed on multiple servers, built on top of Apache Pulsar. With Infinitic, you can easily manage complex scenarios, ensuring that failures don't disrupt your workflows."
115+
"""
116+
This repository provides an auto-configuration integration with Spring Boot for the
117+
Infinitic library, which is designed to orchestrate services distributed on multiple servers,
118+
built on top of Apache Pulsar. With Infinitic, you can easily manage complex scenarios, ensuring
119+
that failures don't disrupt your workflows.
120+
""".trim()
117121
url = "https://github.com/tiarebalbi/infinitic-spring-boot-integration"
118122
packaging = "jar"
119123

infinitic-spring-boot-3-starter/src/main/kotlin/com/tiarebalbi/infinitic/spring/InfiniticAutoConfiguration.kt

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,29 +50,30 @@ import org.springframework.core.io.ResourceLoader
5050
@Configuration
5151
@ConditionalOnProperty(
5252
name = ["infinitic.enabled"],
53-
havingValue = "true"
53+
havingValue = "true",
5454
)
5555
@EnableConfigurationProperties(InfiniticProperties::class)
5656
class InfiniticAutoConfiguration(
5757
private val properties: InfiniticProperties,
58-
private val resourceLoader: ResourceLoader
58+
private val resourceLoader: ResourceLoader,
5959
) {
6060
private val logger = LoggerFactory.getLogger(this::class.java)
6161

6262
@Bean
6363
@ConditionalOnProperty(name = ["infinitic.worker.enabled"], havingValue = "true")
6464
@ConditionalOnMissingBean
65-
fun configureWorker() = InitializingBean {
66-
val config = getWorkerConfig()
67-
InfiniticWorker.fromConfig(config).use {
68-
logger.info("Starting infinitic worker")
69-
if (properties.worker.executionMode.isAsync()) {
70-
it.startAsync()
71-
} else {
72-
it.start()
65+
fun configureWorker() =
66+
InitializingBean {
67+
val config = getWorkerConfig()
68+
InfiniticWorker.fromConfig(config).use {
69+
logger.info("Starting infinitic worker")
70+
if (properties.worker.executionMode.isAsync()) {
71+
it.startAsync()
72+
} else {
73+
it.start()
74+
}
7375
}
7476
}
75-
}
7677

7778
@Bean
7879
@ConditionalOnProperty(name = ["infinitic.client.enabled"], havingValue = "true")
@@ -91,8 +92,9 @@ class InfiniticAutoConfiguration(
9192
}
9293

9394
private fun getWorkerConfig(): WorkerConfig {
94-
val configuration = properties.worker.configuration
95-
?: throw IllegalStateException("Unable to find worker infinitic configuration")
95+
val configuration =
96+
properties.worker.configuration
97+
?: throw IllegalStateException("Unable to find worker infinitic configuration")
9698
val configurationFile = resourceLoader.getResource(configuration)
9799
return WorkerConfig.fromFile(configurationFile.file.absolutePath)
98100
}

infinitic-spring-boot-3-starter/src/main/kotlin/com/tiarebalbi/infinitic/spring/InfiniticProperties.kt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ data class InfiniticProperties(
2828
/**
2929
* Represents the properties of a client.
3030
*/
31-
val client: ClientProperties = ClientProperties(enabled = true)
31+
val client: ClientProperties = ClientProperties(enabled = true),
3232
) : Serializable {
33-
3433
/**
3534
* Represents the properties of a worker.
3635
*
@@ -43,18 +42,15 @@ data class InfiniticProperties(
4342
* The execution mode of the worker. The Default value is ExecutionMode.ASYNC.
4443
*/
4544
val enabled: Boolean = true,
46-
4745
/**
4846
* The execution mode for the initialization of the worker
4947
*/
5048
val executionMode: ExecutionMode = ExecutionMode.ASYNC,
51-
5249
/**
5350
* The configuration file for the worker.
5451
*/
55-
val configuration: String? = null
52+
val configuration: String? = null,
5653
) : Serializable {
57-
5854
/**
5955
* Represents the execution mode of a process.
6056
*
@@ -64,7 +60,8 @@ data class InfiniticProperties(
6460
*/
6561
enum class ExecutionMode {
6662
SYNC,
67-
ASYNC;
63+
ASYNC,
64+
;
6865

6966
fun isAsync(): Boolean {
7067
return this == ASYNC
@@ -86,6 +83,6 @@ data class InfiniticProperties(
8683
/**
8784
* The configuration file for the client.
8885
*/
89-
val configuration: String? = null
86+
val configuration: String? = null,
9087
) : Serializable
9188
}

infinitic-spring-boot-3-starter/src/test/kotlin/com/tiarebalbi/infinitic/tests/AnnotatedService.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@ import io.infinitic.annotations.Name
55
@Name("annotatedService")
66
interface AnnotatedService {
77
@Name("bar")
8-
fun foo(str1: String, str2: String): String
8+
fun foo(
9+
str1: String,
10+
str2: String,
11+
): String
912
}
1013

1114
@Suppress("unused")
1215
class AnnotatedServiceImpl : AnnotatedService {
13-
override fun foo(str1: String, str2: String) = str1 + str2
16+
override fun foo(
17+
str1: String,
18+
str2: String,
19+
) = str1 + str2
1420
}

0 commit comments

Comments
 (0)