Fix warnings in Startup

This commit is contained in:
Minecon724 2024-09-16 19:01:00 +02:00
parent e9361ece41
commit dc29ccbcd6
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8

View file

@ -4,7 +4,6 @@ import eu.m724.talkpages.orm.entity.auth.Account;
import eu.m724.talkpages.orm.entity.content.Page; import eu.m724.talkpages.orm.entity.content.Page;
import eu.m724.talkpages.orm.entity.content.PageRevision; import eu.m724.talkpages.orm.entity.content.PageRevision;
import eu.m724.talkpages.theme.ThemeService; import eu.m724.talkpages.theme.ThemeService;
import io.quarkus.runtime.LaunchMode;
import io.quarkus.runtime.StartupEvent; import io.quarkus.runtime.StartupEvent;
import io.vertx.ext.web.Router; import io.vertx.ext.web.Router;
import io.vertx.ext.web.handler.StaticHandler; import io.vertx.ext.web.handler.StaticHandler;
@ -18,15 +17,12 @@ import org.eclipse.microprofile.config.inject.ConfigProperty;
@Singleton @Singleton
public class Startup { public class Startup {
@Inject @Inject
LaunchMode launchMode; private ThemeService themeService;
@Inject
ThemeService themeService;
@ConfigProperty(name = "talkpages.systemUser.name") @ConfigProperty(name = "talkpages.systemUser.name")
private String username; private String username;
void installStaticRoute(@Observes StartupEvent startupEvent, Router router) { void installStaticRoute(@Observes StartupEvent ignoredEvent, Router router) {
router.route() router.route()
.path("/static/*") .path("/static/*")
.handler(StaticHandler.create("static/")); .handler(StaticHandler.create("static/"));