Add updateCopyrights Gradle task

* Fix Checkstyle violations for `spring-config-common` and `spring-aggregator-function`
This commit is contained in:
Artem Bilan
2024-01-03 14:46:20 -05:00
parent f6eafc9511
commit 8e64a131f7
7 changed files with 100 additions and 57 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2020-2023 the original author or authors.
* Copyright 2020-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -49,6 +49,8 @@ import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
/**
* The auto-configuration for aggregator function.
*
* @author Artem Bilan
* @author Corneil du Plessis
*/
@@ -65,7 +67,7 @@ public class AggregatorFunctionConfiguration {
@Bean
public Function<Flux<Message<?>>, Flux<Message<?>>> aggregatorFunction(FluxMessageChannel inputChannel,
FluxMessageChannel outputChannel) {
return input -> Flux.from(outputChannel)
return (input) -> Flux.from(outputChannel)
.doOnRequest((request) -> inputChannel.subscribeTo(input.map((
inputMessage) -> MessageBuilder.fromMessage(inputMessage).removeHeader("kafka_consumer").build())));
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2020-2020 the original author or authors.
* Copyright 2020-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -57,7 +57,7 @@ class MessageStoreConfiguration {
static class Mongo {
@Bean
public MessageGroupStore messageStore(MongoTemplate mongoTemplate, AggregatorFunctionProperties properties) {
MessageGroupStore messageStore(MongoTemplate mongoTemplate, AggregatorFunctionProperties properties) {
if (StringUtils.hasText(properties.getMessageStoreEntity())) {
return new ConfigurableMongoDbMessageStore(mongoTemplate, properties.getMessageStoreEntity());
}
@@ -68,7 +68,7 @@ class MessageStoreConfiguration {
@Bean
@Primary
public MongoCustomConversions mongoDbCustomConversions() {
MongoCustomConversions mongoDbCustomConversions() {
return new MongoCustomConversions(
Arrays.asList(new MessageToBinaryConverter(), new BinaryToMessageConverter()));
}
@@ -82,7 +82,7 @@ class MessageStoreConfiguration {
static class Redis {
@Bean
public MessageGroupStore messageStore(RedisTemplate<?, ?> redisTemplate) {
MessageGroupStore messageStore(RedisTemplate<?, ?> redisTemplate) {
return new RedisMessageStore(redisTemplate.getConnectionFactory());
}
@@ -95,7 +95,7 @@ class MessageStoreConfiguration {
static class Jdbc {
@Bean
public MessageGroupStore messageStore(JdbcTemplate jdbcTemplate, AggregatorFunctionProperties properties) {
MessageGroupStore messageStore(JdbcTemplate jdbcTemplate, AggregatorFunctionProperties properties) {
JdbcMessageStore messageStore = new JdbcMessageStore(jdbcTemplate);
if (StringUtils.hasText(properties.getMessageStoreEntity())) {
messageStore.setTablePrefix(properties.getMessageStoreEntity());

View File

@@ -0,0 +1,4 @@
/**
* The aggregator function support classes.
*/
package org.springframework.cloud.fn.aggregator;