Skip to content

Commit

Permalink
feat: update custom repository in log
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio Santana <otaviopolianasantana@gmail.com>
  • Loading branch information
otaviojava committed May 31, 2024
1 parent 8c0b12d commit 7e819ab
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.util.Arrays;
import java.util.Optional;
import java.util.logging.Logger;

Expand Down Expand Up @@ -64,8 +65,10 @@ public class CustomRepositoryHandler implements InvocationHandler {

@Override
public Object invoke(Object proxy, Method method, Object[] params) throws Throwable {
LOGGER.info("Executing the method: " + method);

RepositoryType type = RepositoryType.of(method, customRepositoryType);
LOGGER.info("Executing the method " + method + " with the parameters " + Arrays.toString(params) + " and the type " + type);

switch (type) {
case SAVE -> {
return unwrapInvocationTargetException(() -> SAVE.invoke(new AnnotationOperation.Operation(method, params, repository(params))));
Expand Down

0 comments on commit 7e819ab

Please sign in to comment.