mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-19 18:05:41 -05:00
refactor(core): migrate to standard Java ServiceLoader for plugins
Changes: - add new top level interface `Plugin` - add new `JsonDeserializer` aware of the `PluginRegistry` - add new annotation processor for plugin - migrate to hibernate-validator for the JSR-303 (no bean introspection dependencies) - update all Validation annotations to be complitant with the JSR-303 - remove all KestraApplicationContext stuffs - fix some tests part-of: kestra-io/plugin-template-test#25 part-of: kestra-io/plugin-serdes#103
This commit is contained in:
committed by
Florian Hussonnois
parent
65d7e7c949
commit
56884d5a72
@@ -1,5 +1,7 @@
|
||||
dependencies {
|
||||
annotationProcessor project(":processor")
|
||||
implementation project(":core")
|
||||
|
||||
testAnnotationProcessor project(":processor")
|
||||
testImplementation project(':core').sourceSets.test.output
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.kestra.storage.local;
|
||||
|
||||
import io.kestra.core.models.annotations.Plugin;
|
||||
import io.kestra.core.storages.FileAttributes;
|
||||
import io.kestra.core.storages.StorageInterface;
|
||||
import jakarta.inject.Inject;
|
||||
@@ -18,11 +19,17 @@ import java.util.stream.Stream;
|
||||
|
||||
import static io.kestra.core.utils.Rethrow.throwFunction;
|
||||
|
||||
@Plugin
|
||||
@Singleton
|
||||
@LocalStorageEnabled
|
||||
public class LocalStorage implements StorageInterface {
|
||||
LocalConfig config;
|
||||
|
||||
/**
|
||||
* No-arg constructor - required by Kestra service loader.
|
||||
*/
|
||||
public LocalStorage() {}
|
||||
|
||||
@Inject
|
||||
public LocalStorage(LocalConfig config) throws IOException {
|
||||
this.config = config;
|
||||
|
||||
Reference in New Issue
Block a user