2 Commits
1.0.2 ... 1.1.0

Author SHA1 Message Date
semantic-release-bot
78189e5c75 chore(release): 1.1.0 [skip ci]
# [1.1.0](https://git.tools.ldpt.fr/lucasdpt/spring-jda-starter/compare/1.0.2...1.1.0) (2025-12-15)

### Features

* add JdaAutoConfiguration.kt ([e7fdd19](e7fdd19928))
2025-12-15 14:21:26 +00:00
lucasdpt
e7fdd19928 feat: add JdaAutoConfiguration.kt
All checks were successful
Release / release (push) Successful in 2m7s
2025-12-15 15:20:49 +01:00
5 changed files with 48 additions and 5 deletions

View File

@@ -1,3 +1,10 @@
# [1.1.0](https://git.tools.ldpt.fr/lucasdpt/spring-jda-starter/compare/1.0.2...1.1.0) (2025-12-15)
### Features
* add JdaAutoConfiguration.kt ([e7fdd19](https://git.tools.ldpt.fr/lucasdpt/spring-jda-starter/commit/e7fdd19928dbe20f0e71203cf4074c3ca5a9e667))
## [1.0.2](https://git.tools.ldpt.fr/lucasdpt/spring-jda-starter/compare/1.0.1...1.0.2) (2025-11-02)

10
pom.xml
View File

@@ -5,7 +5,7 @@
<groupId>fr.lucasdupont</groupId>
<artifactId>spring-jda-starter</artifactId>
<version>1.0.2</version>
<version>1.1.0</version>
<properties>
<java.version>21</java.version>
@@ -38,6 +38,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
@@ -66,6 +71,9 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>

View File

@@ -0,0 +1,30 @@
package fr.lucasdupont.configuration
import fr.lucasdupont.service.JdaService
import org.springframework.boot.autoconfigure.AutoConfiguration
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.ApplicationContext
import org.springframework.context.ApplicationEventPublisher
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.ComponentScan
@AutoConfiguration
@EnableConfigurationProperties(JdaConfiguration::class)
@ConditionalOnProperty(prefix = "jda", name = ["token"])
@ComponentScan(basePackages = ["fr.lucasdupont"])
class JdaAutoConfiguration {
@Bean
@ConditionalOnMissingBean
fun jdaService(
applicationContext: ApplicationContext,
jdaConfiguration: JdaConfiguration,
publisher: ApplicationEventPublisher
): JdaService {
return JdaService(applicationContext, jdaConfiguration, publisher)
}
}

View File

@@ -11,15 +11,11 @@ import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEve
import net.dv8tion.jda.api.hooks.ListenerAdapter
import net.dv8tion.jda.api.requests.GatewayIntent
import net.dv8tion.jda.api.utils.cache.CacheFlag
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.ApplicationContext
import org.springframework.context.ApplicationEventPublisher
import org.springframework.context.PayloadApplicationEvent
import org.springframework.context.event.EventListener
import org.springframework.stereotype.Service
@Service
@EnableConfigurationProperties(JdaConfiguration::class)
class JdaService(
applicationContext: ApplicationContext,
jdaConfiguration: JdaConfiguration,

View File

@@ -0,0 +1,2 @@
fr.lucasdupont.configuration.JdaAutoConfiguration