Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand Down
11 changes: 8 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import com.github.jengelman.gradle.plugins.shadow.transformers.*
plugins {
java
id("com.github.johnrengelman.shadow") version "7.1.2"
id("org.springframework.boot") version "2.7.3"
id("io.spring.dependency-management") version "1.0.11.RELEASE"
id("org.springframework.boot") version "3.2.0"
id("io.spring.dependency-management") version "1.0.15.RELEASE"
checkstyle
}

Expand Down Expand Up @@ -43,7 +43,6 @@ dependencies {
implementation("com.google.re2j:re2j:1.6")
implementation("commons-validator:commons-validator:1.7")

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

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

configurations {
all {
exclude(group = "commons-logging", module = "commons-logging")
}
}

tasks.withType<Jar> {
manifest {
attributes["Manifest-Version"] = "1.0"
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/net/discordjug/javabot/SpringConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ ScheduledExecutorService asyncPool(BotConfig config) {
return Executors.newScheduledThreadPool(config.getSystems().getAsyncPoolSize());
}

@Bean
BotConfig config() {
return new BotConfig(Path.of("config"));
}

@Bean
SystemsConfig systemsConfig(BotConfig botConfig) {
return botConfig.getSystems();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import org.jetbrains.annotations.NotNull;
import org.springframework.dao.DataAccessException;
import org.springframework.transaction.annotation.Transactional;

import java.time.ZoneOffset;
import java.util.List;
Expand All @@ -26,7 +25,7 @@
public class ListQuestionsSubcommand extends QOTWSubcommand {
private final ExecutorService asyncPool;
private final QuestionQueueRepository questionQueueRepository;

/**
* The constructor of this class, which sets the corresponding {@link SubcommandData}.
* @param questionQueueRepository Dao class that represents the QOTW_QUESTION SQL Table.
Expand All @@ -41,7 +40,6 @@ public ListQuestionsSubcommand(QuestionQueueRepository questionQueueRepository,
}

@Override
@Transactional
protected InteractionCallbackAction<?> handleCommand(@NotNull SlashCommandInteractionEvent event, long guildId) throws DataAccessException {
OptionMapping pageOption = event.getOption("page");
int page = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import org.jetbrains.annotations.NotNull;
import org.springframework.dao.DataAccessException;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;
Expand All @@ -41,7 +40,6 @@ public RemoveQuestionSubcommand(QuestionQueueRepository questionQueueRepository)
}

@Override
@Transactional
protected InteractionCallbackAction<?> handleCommand(SlashCommandInteractionEvent event, long guildId) throws DataAccessException {
OptionMapping idOption = event.getOption("id");
if (idOption == null) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
server.address=127.0.0.1
server.port=9000
tomcat.ajp.port=9001
tomcat.ajp.enabled=true
tomcat.ajp.enabled=true