Update docs as follows:
Resolves #811 * code examples reflect current versions and APIs being used * code examples use dynamic version numbers based on maven properties
This commit is contained in:
@@ -42,6 +42,12 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.asciidoctor</groupId>
|
<groupId>org.asciidoctor</groupId>
|
||||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<attributes>
|
||||||
|
<project-version>${project.version}</project-version>
|
||||||
|
<spring-boot-version>${spring-boot.version}</spring-boot-version>
|
||||||
|
</attributes>
|
||||||
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|||||||
@@ -265,19 +265,19 @@ like the `@Autowired` `TestRestTemplate`, are standard Spring Boot features.
|
|||||||
|
|
||||||
And to help with correct dependencies here is the excerpt from POM
|
And to help with correct dependencies here is the excerpt from POM
|
||||||
|
|
||||||
[source, xml]
|
[source, xml, subs=attributes+]
|
||||||
----
|
----
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>2.2.2.RELEASE</version>
|
<version>{spring-boot-version}</version>
|
||||||
<relativePath/> <!-- lookup parent from repository -->
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
. . . .
|
. . . .
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.cloud</groupId>
|
<groupId>org.springframework.cloud</groupId>
|
||||||
<artifactId>spring-cloud-function-web</artifactId>
|
<artifactId>spring-cloud-function-web</artifactId>
|
||||||
<version>3.0.1.BUILD-SNAPSHOT</version>
|
<version>{project-version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
@@ -292,12 +292,6 @@ And to help with correct dependencies here is the excerpt from POM
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.junit.vintage</groupId>
|
|
||||||
<artifactId>junit-vintage-engine</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
----
|
----
|
||||||
|
|
||||||
@@ -305,7 +299,6 @@ Or you could write a test for a non-HTTP app using just the `FunctionCatalog`. F
|
|||||||
|
|
||||||
[source, java]
|
[source, java]
|
||||||
----
|
----
|
||||||
@RunWith(SpringRunner.class)
|
|
||||||
@FunctionalSpringBootTest
|
@FunctionalSpringBootTest
|
||||||
public class FunctionalTests {
|
public class FunctionalTests {
|
||||||
|
|
||||||
@@ -313,7 +306,7 @@ public class FunctionalTests {
|
|||||||
private FunctionCatalog catalog;
|
private FunctionCatalog catalog;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void words() throws Exception {
|
public void words() {
|
||||||
Function<String, String> function = catalog.lookup(Function.class,
|
Function<String, String> function = catalog.lookup(Function.class,
|
||||||
"uppercase");
|
"uppercase");
|
||||||
assertThat(function.apply("hello")).isEqualTo("HELLO");
|
assertThat(function.apply("hello")).isEqualTo("HELLO");
|
||||||
|
|||||||
Reference in New Issue
Block a user