Skip to content

Commit e20f529

Browse files
Merge pull request #455 from danthe1st/spring-upgrade
2 parents b6067a9 + 31a0c0d commit e20f529

File tree

6 files changed

+11
-15
lines changed

6 files changed

+11
-15
lines changed

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: actions/setup-java@v2
2121
with:
2222
java-version: '17'
23-
distribution: 'adopt'
23+
distribution: 'temurin'
2424
- name: Grant execute permission for gradlew
2525
run: chmod +x gradlew
2626
- name: Build with Gradle

build.gradle.kts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import com.github.jengelman.gradle.plugins.shadow.transformers.*
44
plugins {
55
java
66
id("com.github.johnrengelman.shadow") version "7.1.2"
7-
id("org.springframework.boot") version "2.7.3"
8-
id("io.spring.dependency-management") version "1.0.11.RELEASE"
7+
id("org.springframework.boot") version "3.2.0"
8+
id("io.spring.dependency-management") version "1.0.15.RELEASE"
99
checkstyle
1010
}
1111

@@ -43,7 +43,6 @@ dependencies {
4343
implementation("com.google.re2j:re2j:1.6")
4444
implementation("commons-validator:commons-validator:1.7")
4545

46-
implementation("ch.qos.logback:logback-classic:1.2.11")
4746
implementation("com.mashape.unirest:unirest-java:1.4.9")
4847

4948
// H2 Database
@@ -67,6 +66,12 @@ dependencies {
6766
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
6867
}
6968

69+
configurations {
70+
all {
71+
exclude(group = "commons-logging", module = "commons-logging")
72+
}
73+
}
74+
7075
tasks.withType<Jar> {
7176
manifest {
7277
attributes["Manifest-Version"] = "1.0"

src/main/java/net/discordjug/javabot/SpringConfig.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ ScheduledExecutorService asyncPool(BotConfig config) {
5252
return Executors.newScheduledThreadPool(config.getSystems().getAsyncPoolSize());
5353
}
5454

55-
@Bean
56-
BotConfig config() {
57-
return new BotConfig(Path.of("config"));
58-
}
59-
6055
@Bean
6156
SystemsConfig systemsConfig(BotConfig botConfig) {
6257
return botConfig.getSystems();

src/main/java/net/discordjug/javabot/systems/qotw/commands/questions_queue/ListQuestionsSubcommand.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import org.jetbrains.annotations.NotNull;
1616
import org.springframework.dao.DataAccessException;
17-
import org.springframework.transaction.annotation.Transactional;
1817

1918
import java.time.ZoneOffset;
2019
import java.util.List;
@@ -26,7 +25,7 @@
2625
public class ListQuestionsSubcommand extends QOTWSubcommand {
2726
private final ExecutorService asyncPool;
2827
private final QuestionQueueRepository questionQueueRepository;
29-
28+
3029
/**
3130
* The constructor of this class, which sets the corresponding {@link SubcommandData}.
3231
* @param questionQueueRepository Dao class that represents the QOTW_QUESTION SQL Table.
@@ -41,7 +40,6 @@ public ListQuestionsSubcommand(QuestionQueueRepository questionQueueRepository,
4140
}
4241

4342
@Override
44-
@Transactional
4543
protected InteractionCallbackAction<?> handleCommand(@NotNull SlashCommandInteractionEvent event, long guildId) throws DataAccessException {
4644
OptionMapping pageOption = event.getOption("page");
4745
int page = 0;

src/main/java/net/discordjug/javabot/systems/qotw/commands/questions_queue/RemoveQuestionSubcommand.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import org.jetbrains.annotations.NotNull;
2020
import org.springframework.dao.DataAccessException;
21-
import org.springframework.transaction.annotation.Transactional;
2221

2322
import java.util.ArrayList;
2423
import java.util.List;
@@ -41,7 +40,6 @@ public RemoveQuestionSubcommand(QuestionQueueRepository questionQueueRepository)
4140
}
4241

4342
@Override
44-
@Transactional
4543
protected InteractionCallbackAction<?> handleCommand(SlashCommandInteractionEvent event, long guildId) throws DataAccessException {
4644
OptionMapping idOption = event.getOption("id");
4745
if (idOption == null) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
server.address=127.0.0.1
22
server.port=9000
33
tomcat.ajp.port=9001
4-
tomcat.ajp.enabled=true
4+
tomcat.ajp.enabled=true

0 commit comments

Comments
 (0)