io.katharsis.module.CoreModule Maven / Gradle / Ivy
package io.katharsis.module;
import io.katharsis.errorhandling.mapper.DefaultExceptionMapperLookup;
import io.katharsis.resource.field.ResourceFieldNameTransformer;
import io.katharsis.resource.information.AnnotationResourceInformationBuilder;
import io.katharsis.resource.registry.DefaultResourceLookup;
/**
* Register the Katharsis core feature set as module.
*/
public class CoreModule extends SimpleModule {
public static final String MODULE_NAME = "core";
public CoreModule(String resourceSearchPackage, ResourceFieldNameTransformer resourceFieldNameTransformer) {
super(MODULE_NAME);
this.addResourceLookup(new DefaultResourceLookup(resourceSearchPackage));
this.addResourceInformationBuilder(new AnnotationResourceInformationBuilder(resourceFieldNameTransformer));
this.addExceptionMapperLookup(new DefaultExceptionMapperLookup(resourceSearchPackage));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy