Apply checkstyle changes in stream-applications

* core, source, sink and processor are now updated with latest checkstyle requirements.
This commit is contained in:
Soby Chacko
2020-05-07 11:18:22 -04:00
parent f61fbb4dc9
commit 9bc78ec1fa
234 changed files with 1717 additions and 2419 deletions

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>http-source</artifactId>
<version>3.0.0.BUILD-SNAPSHOT</version>
@@ -51,7 +52,8 @@
<name>http</name>
<type>source</type>
<version>${project.version}</version>
<configClass>org.springframework.cloud.fn.supplier.http.HttpSupplierConfiguration.class</configClass>
<configClass>org.springframework.cloud.fn.supplier.http.HttpSupplierConfiguration.class
</configClass>
</generatedApp>
<dependencies>
@@ -65,7 +67,8 @@
<additionalAppProperties>
<additionalAppProperty>spring.main.web-application-type=reactive</additionalAppProperty>
<additionalAppProperty>spring.cloud.streamapp.security.enabled=false</additionalAppProperty>
<additionalAppProperty>spring.cloud.streamapp.security.csrf-enabled=false</additionalAppProperty>
<additionalAppProperty>spring.cloud.streamapp.security.csrf-enabled=false
</additionalAppProperty>
</additionalAppProperties>
</configuration>
</plugin>

View File

@@ -1,3 +1,3 @@
configuration-properties.classes=HttpSourceProperties,\
HttpSourceProperties$Cors
configuration-properties.names=server.port
configuration-properties.names=server.port

View File

@@ -17,6 +17,7 @@
package org.springframework.cloud.stream.app;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.test.context.SpringBootTest;
@@ -34,24 +35,24 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Soby Chacko
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {"spring.cloud.function.definition=httpSupplier","debug=true"})
properties = {"spring.cloud.function.definition=httpSupplier", "debug=true"})
public class HttpSourceTests {
@Autowired
private TestRestTemplate testRestTemplate;
@Autowired
OutputDestination outputDestination;
@Autowired
private TestRestTemplate testRestTemplate;
@Test
public void testSourceFromSupplier() {
testRestTemplate.postForObject("/", "test1", Object.class);
Message<byte[]> sourceMessage = outputDestination.receive(10000);
final String actual = new String(sourceMessage.getPayload());
assertThat(actual).isEqualTo("test1");
testRestTemplate.postForObject("/", "test1", Object.class);
Message<byte[]> sourceMessage = outputDestination.receive(10000);
final String actual = new String(sourceMessage.getPayload());
assertThat(actual).isEqualTo("test1");
}
@SpringBootApplication
@Import({HttpSupplierConfiguration.class, TestChannelBinderConfiguration.class, BindingServiceConfiguration.class})
public static class HttpSourceConfiguration {}
public static class HttpSourceConfiguration {
}
}