From 3cf03b7b505345a754b0dc44261b2a7660f54fd3 Mon Sep 17 00:00:00 2001 From: Stephen Cochrane Date: Sat, 25 Feb 2023 01:01:02 +0200 Subject: [PATCH] Added marker class for module confs --- pom.xml | 4 ++-- src/main/java/xyz/skiqqy/cosmic/lib/module/Module.java | 6 ++---- src/main/java/xyz/skiqqy/cosmic/lib/module/ModuleConf.java | 6 ++++++ 3 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 src/main/java/xyz/skiqqy/cosmic/lib/module/ModuleConf.java diff --git a/pom.xml b/pom.xml index 0d95461..733678c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,8 +4,8 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - xyz.skiqqy.cosmic.lib - libCosmic + xyz.skiqqy.cosmic + lib 1.0.0 diff --git a/src/main/java/xyz/skiqqy/cosmic/lib/module/Module.java b/src/main/java/xyz/skiqqy/cosmic/lib/module/Module.java index 5119b3c..db5b591 100644 --- a/src/main/java/xyz/skiqqy/cosmic/lib/module/Module.java +++ b/src/main/java/xyz/skiqqy/cosmic/lib/module/Module.java @@ -7,8 +7,6 @@ import java.lang.annotation.Target; import org.springframework.web.bind.annotation.RestController; -import xyz.skiqqy.comfy.core.Conf; - /* A "Module" is bean which takes a config used to build a restful web service * for some abstract java application. * @@ -20,7 +18,7 @@ import xyz.skiqqy.comfy.core.Conf; * The contract a class accepts when using this annotation is the following. * * 1. There can only be a single constructor, with 2 argument's: -* - A xyz.skiqqy.comfy.core.Conf (or a subclass there off), specifically it +* - ModuleConf (or a subclass there off), specifically it * takes the type given to the annotation. * - A string, which is to be prepended to any paths (i.e the root url) * @@ -42,5 +40,5 @@ import xyz.skiqqy.comfy.core.Conf; @Retention(RetentionPolicy.RUNTIME) @RestController public @interface Module { - Class value(); + Class value(); } diff --git a/src/main/java/xyz/skiqqy/cosmic/lib/module/ModuleConf.java b/src/main/java/xyz/skiqqy/cosmic/lib/module/ModuleConf.java new file mode 100644 index 0000000..75bed05 --- /dev/null +++ b/src/main/java/xyz/skiqqy/cosmic/lib/module/ModuleConf.java @@ -0,0 +1,6 @@ +package xyz.skiqqy.cosmic.lib.module; + +import xyz.skiqqy.comfy.core.Conf; + +// Marker class, helpful for searching for modules +public abstract class ModuleConf extends Conf {} -- 2.45.2