Skip to content

Commit c61f69d

Browse files
onobcolegz
authored andcommitted
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
1 parent 9d38bac commit c61f69d

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

docs/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@
4242
<plugin>
4343
<groupId>org.asciidoctor</groupId>
4444
<artifactId>asciidoctor-maven-plugin</artifactId>
45+
<configuration>
46+
<attributes>
47+
<project-version>${project.version}</project-version>
48+
<spring-boot-version>${spring-boot.version}</spring-boot-version>
49+
</attributes>
50+
</configuration>
4551
</plugin>
4652

4753
<plugin>

docs/src/main/asciidoc/functional.adoc

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -265,19 +265,19 @@ like the `@Autowired` `TestRestTemplate`, are standard Spring Boot features.
265265

266266
And to help with correct dependencies here is the excerpt from POM
267267

268-
[source, xml]
268+
[source, xml, subs=attributes+]
269269
----
270270
<parent>
271271
<groupId>org.springframework.boot</groupId>
272272
<artifactId>spring-boot-starter-parent</artifactId>
273-
<version>2.2.2.RELEASE</version>
273+
<version>{spring-boot-version}</version>
274274
<relativePath/> <!-- lookup parent from repository -->
275275
</parent>
276276
. . . .
277277
<dependency>
278278
<groupId>org.springframework.cloud</groupId>
279279
<artifactId>spring-cloud-function-web</artifactId>
280-
<version>3.0.1.BUILD-SNAPSHOT</version>
280+
<version>{project-version}</version>
281281
</dependency>
282282
<dependency>
283283
<groupId>org.springframework.boot</groupId>
@@ -292,28 +292,21 @@ And to help with correct dependencies here is the excerpt from POM
292292
<groupId>org.springframework.boot</groupId>
293293
<artifactId>spring-boot-starter-test</artifactId>
294294
<scope>test</scope>
295-
<exclusions>
296-
<exclusion>
297-
<groupId>org.junit.vintage</groupId>
298-
<artifactId>junit-vintage-engine</artifactId>
299-
</exclusion>
300-
</exclusions>
301295
</dependency>
302296
----
303297

304298
Or you could write a test for a non-HTTP app using just the `FunctionCatalog`. For example:
305299

306300
[source, java]
307301
----
308-
@RunWith(SpringRunner.class)
309302
@FunctionalSpringBootTest
310303
public class FunctionalTests {
311304
312305
@Autowired
313306
private FunctionCatalog catalog;
314307
315308
@Test
316-
public void words() throws Exception {
309+
public void words() {
317310
Function<String, String> function = catalog.lookup(Function.class,
318311
"uppercase");
319312
assertThat(function.apply("hello")).isEqualTo("HELLO");

0 commit comments

Comments
 (0)