Repository navigation
0.8.0
Breaking changes
MethodInvokerFactoryinterface andDefaultMethodInvokerFactoryclass removed. Replaced by a nested public interfaceMethodInvoker.Builder<A>with.resolver(...)/.interceptor(...)/.build(). The concrete implementation (DefaultMethodInvokerBuilder) is package-private; users obtain builders viaMethodInvoker.builder(method, target, argumentType). The old factory interface + implementation provided no value over a direct builder for a stateless, single-implementation construction operation.MethodInvokerConfig<A>interface removed. The separate "config surface withoutbuild()" interface is absorbed intoMethodInvoker.Builder<A>. Helpers that want to accept configuration contributions takeConsumer<MethodInvoker.Builder<A>>or the builder itself; convention ("don't callbuild()from inside the contributor") replaces the type-system signal.- Package flattened. The
org.jwcarman.methodical.def,org.jwcarman.methodical.intercept, andorg.jwcarman.methodical.paramsubpackages are gone. All public and package-private types now live in a singleorg.jwcarman.methodicalpackage. Imports likeorg.jwcarman.methodical.intercept.MethodInterceptorbecomeorg.jwcarman.methodical.MethodInterceptor; likewise forParameterInfo,ParameterResolver,MethodInvocation,MethodInterceptors. methodical-autoconfigureandmethodical-spring-boot-startermodules removed. Methodical now ships as a plain Java library with no Spring Boot coupling. The Maven coordinatesorg.jwcarman.methodical:methodical-autoconfigureandorg.jwcarman.methodical:methodical-spring-boot-starterno longer exist. The BOM (methodical-bom) no longer declares those artifacts. Spring Boot consumers now wire beans themselves — see migration below.
Migration
Construction (before):
MethodInvokerFactory factory = new DefaultMethodInvokerFactory();
MethodInvoker<Req> invoker = factory.create(
method, target, Req.class,
cfg -> cfg.resolver(r).interceptor(i));Construction (after):
MethodInvoker<Req> invoker =
MethodInvoker.builder(method, target, Req.class)
.resolver(r)
.interceptor(i)
.build();Spring Boot consumers (before — Spring Boot starter):
<dependency>
<groupId>org.jwcarman.methodical</groupId>
<artifactId>methodical-spring-boot-starter</artifactId>
<version>0.7.0</version>
</dependency>Spring Boot consumers (after — plain libraries + one @Configuration class you write yourself):
<dependency>
<groupId>org.jwcarman.methodical</groupId>
<artifactId>methodical-core</artifactId>
<version>0.8.0</version>
</dependency>
<dependency>
<groupId>org.jwcarman.methodical</groupId>
<artifactId>methodical-jackson3</artifactId>
<version>0.8.0</version>
</dependency>
<!-- optional -->
<dependency>
<groupId>org.jwcarman.methodical</groupId>
<artifactId>methodical-jakarta-validation</artifactId>
<version>0.8.0</version>
</dependency>@Configuration
class MethodicalConfig {
@Bean Jackson3ParameterResolver jsonResolver(ObjectMapper mapper) {
return new Jackson3ParameterResolver(mapper);
}
@Bean @ConditionalOnBean(Validator.class)
JakartaValidationInterceptor jakartaValidation(Validator validator) {
return new JakartaValidationInterceptor(validator);
}
}
// In the class that builds invokers, inject the beans above and call
// MethodInvoker.builder(method, target, argType)
// .resolver(jsonResolver)
// .interceptor(jakartaValidation)
// .build();