Implement Spring Boot for deployment/feature enhancement
This commit is contained in:
parent
18353617f0
commit
96e69950c6
@ -5,9 +5,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
|
id 'org.springframework.boot' version '2.3.3.RELEASE'
|
||||||
id 'application'
|
id 'application'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apply plugin: 'io.spring.dependency-management'
|
||||||
|
|
||||||
group 'dev.salmonllama'
|
group 'dev.salmonllama'
|
||||||
version '2.0.1'
|
version '2.0.1'
|
||||||
|
|
||||||
@ -27,6 +30,10 @@ dependencies {
|
|||||||
implementation 'com.vdurmont:emoji-java:4.0.0'
|
implementation 'com.vdurmont:emoji-java:4.0.0'
|
||||||
implementation 'com.squareup.okhttp3:okhttp:4.4.0'
|
implementation 'com.squareup.okhttp3:okhttp:4.4.0'
|
||||||
|
|
||||||
|
implementation 'org.springframework.boot:spring-boot-starter-actuator'
|
||||||
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||||
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||||
|
|
||||||
testImplementation group: 'junit', name: 'junit', version: '4.12'
|
testImplementation group: 'junit', name: 'junit', version: '4.12'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,15 +12,18 @@ import dev.salmonllama.fsbot.listeners.*;
|
|||||||
import org.javacord.api.DiscordApiBuilder;
|
import org.javacord.api.DiscordApiBuilder;
|
||||||
|
|
||||||
import dev.salmonllama.fsbot.utilities.Constants;
|
import dev.salmonllama.fsbot.utilities.Constants;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
// TODO: auto-switching status messages.
|
// TODO: auto-switching status messages.
|
||||||
// TODO: Add an official Logger --> logging to Discord, not console
|
// TODO: Add an official Logger --> logging to Discord, not console
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
public class Main {
|
public class Main {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
String configLocation = Constants.BOT_FOLDER.concat(Constants.CONFIG_NAME);
|
String configLocation = Constants.BOT_FOLDER.concat(Constants.CONFIG_NAME);
|
||||||
BotConfig.initConfig(configLocation, false); // TODO: Use args to dictate newFiling. Also use args to dictate database setup.
|
BotConfig.initConfig(configLocation, false);
|
||||||
|
// TODO: Use args to dictate newFiling. Also use args to dictate database setup.
|
||||||
|
|
||||||
FSDB.init();
|
FSDB.init();
|
||||||
|
|
||||||
@ -40,5 +43,7 @@ public class Main {
|
|||||||
System.out.printf("Bot invite: %s%n", api.createBotInvite());
|
System.out.printf("Bot invite: %s%n", api.createBotInvite());
|
||||||
System.out.printf("Logged in as %s%n", api.getYourself().getDiscriminatedName());
|
System.out.printf("Logged in as %s%n", api.getYourself().getDiscriminatedName());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
SpringApplication.run(Main.class, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
package dev.salmonllama.fsbot.commands.developer;
|
package dev.salmonllama.fsbot.commands.developer;
|
||||||
|
|
||||||
|
import dev.salmonllama.fsbot.Main;
|
||||||
import dev.salmonllama.fsbot.database.controllers.OutfitController;
|
import dev.salmonllama.fsbot.database.controllers.OutfitController;
|
||||||
import dev.salmonllama.fsbot.guthix.Command;
|
import dev.salmonllama.fsbot.guthix.Command;
|
||||||
import dev.salmonllama.fsbot.guthix.CommandContext;
|
import dev.salmonllama.fsbot.guthix.CommandContext;
|
||||||
|
Loading…
Reference in New Issue
Block a user