deps: Refactor dependencies (#3224)

* remove spring dep
move junit, logging, mockito under dep mgmt

* upgrade anti-corruption-layer deps

* async method invocation

* balking, bloc

* bridge to bytecode

* caching

* callback - cqrs

* component - health check

* hexagonal - metadata mapping

* rest of the patterns

* remove checkstyle, take spotless into use
This commit is contained in:
Ilkka Seppälä
2025-03-29 19:34:27 +02:00
committed by GitHub
parent 371439aeaa
commit 0ca162a55c
1863 changed files with 14408 additions and 17637 deletions
@@ -61,5 +61,4 @@ public class App {
dispatcher.dispatch(new UserCreatedEvent(user));
dispatcher.dispatch(new UserUpdatedEvent(user));
}
}
@@ -30,10 +30,12 @@ import com.iluwatar.eda.framework.EventDispatcher;
/**
* The {@link AbstractEvent} class serves as a base class for defining custom events happening with
* your system. In this example we have two types of events defined.
*
* <ul>
* <li>{@link UserCreatedEvent} - used when a user is created</li>
* <li>{@link UserUpdatedEvent} - used when a user is updated</li>
* <li>{@link UserCreatedEvent} - used when a user is created
* <li>{@link UserUpdatedEvent} - used when a user is updated
* </ul>
*
* Events can be distinguished using the {@link #getType() getType} method.
*/
public abstract class AbstractEvent implements Event {
@@ -47,4 +49,4 @@ public abstract class AbstractEvent implements Event {
public Class<? extends Event> getType() {
return getClass();
}
}
}
@@ -29,9 +29,9 @@ import lombok.Getter;
import lombok.RequiredArgsConstructor;
/**
* The {@link UserCreatedEvent} should be dispatched whenever a user has been created.
* This class can be extended to contain details about the user has been created.
* In this example, the entire {@link User} object is passed on as data with the event.
* The {@link UserCreatedEvent} should be dispatched whenever a user has been created. This class
* can be extended to contain details about the user has been created. In this example, the entire
* {@link User} object is passed on as data with the event.
*/
@RequiredArgsConstructor
@Getter
@@ -29,9 +29,9 @@ import lombok.Getter;
import lombok.RequiredArgsConstructor;
/**
* The {@link UserUpdatedEvent} should be dispatched whenever a user has been updated.
* This class can be extended to contain details about the user has been updated.
* In this example, the entire {@link User} object is passed on as data with the event.
* The {@link UserUpdatedEvent} should be dispatched whenever a user has been updated. This class
* can be extended to contain details about the user has been updated. In this example, the entire
* {@link User} object is passed on as data with the event.
*/
@RequiredArgsConstructor
@Getter
@@ -43,12 +43,9 @@ public class EventDispatcher {
* Links an {@link Event} to a specific {@link Handler}.
*
* @param eventType The {@link Event} to be registered
* @param handler The {@link Handler} that will be handling the {@link Event}
* @param handler The {@link Handler} that will be handling the {@link Event}
*/
public <E extends Event> void registerHandler(
Class<E> eventType,
Handler<E> handler
) {
public <E extends Event> void registerHandler(Class<E> eventType, Handler<E> handler) {
handlers.put(eventType, handler);
}
@@ -64,5 +61,4 @@ public class EventDispatcher {
handler.onEvent(event);
}
}
}
@@ -28,9 +28,7 @@ import com.iluwatar.eda.event.UserCreatedEvent;
import com.iluwatar.eda.framework.Handler;
import lombok.extern.slf4j.Slf4j;
/**
* Handles the {@link UserCreatedEvent} message.
*/
/** Handles the {@link UserCreatedEvent} message. */
@Slf4j
public class UserCreatedEventHandler implements Handler<UserCreatedEvent> {
@@ -38,5 +36,4 @@ public class UserCreatedEventHandler implements Handler<UserCreatedEvent> {
public void onEvent(UserCreatedEvent event) {
LOGGER.info("User '{}' has been Created!", event.getUser().username());
}
}
@@ -28,9 +28,7 @@ import com.iluwatar.eda.event.UserUpdatedEvent;
import com.iluwatar.eda.framework.Handler;
import lombok.extern.slf4j.Slf4j;
/**
* Handles the {@link UserUpdatedEvent} message.
*/
/** Handles the {@link UserUpdatedEvent} message. */
@Slf4j
public class UserUpdatedEventHandler implements Handler<UserUpdatedEvent> {
@@ -26,8 +26,6 @@ package com.iluwatar.eda.model;
import com.iluwatar.eda.event.UserCreatedEvent;
import com.iluwatar.eda.event.UserUpdatedEvent;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
/**
* This {@link User} class is a basic pojo used to demonstrate user data sent along with the {@link