
entry-point.async-event-handler.queries-handler.mustache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scaffold-clean-architecture Show documentation
Show all versions of scaffold-clean-architecture Show documentation
Gradle plugin to create a clean application in Java that already works, It follows our best practices!
package {{package}}.events.handlers;
{{#lombok}}
import lombok.AllArgsConstructor;
{{/lombok}}
import org.reactivecommons.async.impl.config.annotations.EnableQueryListeners;
import reactor.core.publisher.Mono;
{{#eda}}
import io.cloudevents.CloudEvent;
{{/eda}}
{{#lombok}}
@AllArgsConstructor
{{/lombok}}
@EnableQueryListeners
public class QueriesHandler {
// private final SampleUseCase sampleUseCase;
{{^lombok}}
public QueriesHandler(/*SampleUseCase sampleUseCase*/) {
//this.sampleUseCase = sampleUseCase;
}
{{/lombok}}
{{#eda}}
public Mono handleQueryA(CloudEvent query) {
System.out.println("query received->" + query); // TODO: Remove this line
// return sampleUseCase.doSomethingReturningNoMonoVoid(query);
return Mono.just("Response Data");
}
{{/eda}}
{{^eda}}
public Mono handleQueryA(Object query/*change for proper model*/) {
System.out.println("query received->" + query); // TODO: Remove this line
// return sampleUseCase.doSomethingReturningNoMonoVoid(query);
return Mono.just("Response Data");
}
{{/eda}}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy