Commit 05cf7fbb authored by Phillip Webb's avatar Phillip Webb

Use new backend features for extracted samples

Update extracted samples to make use of code folding and chomping.

See gh-6313
parent 1f3acd45
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
:numbered: :numbered:
:sectanchors: :sectanchors:
:sectnums: :sectnums:
:icons: font
:hide-uri-scheme: :hide-uri-scheme:
:docinfo: shared,private :docinfo: shared,private
:chomp: tags formatters headers packages
:spring-boot-artifactory-repo: snapshot :spring-boot-artifactory-repo: snapshot
:github-tag: master :github-tag: master
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration; package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration;
//tag::code[]
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
...@@ -31,7 +30,7 @@ public class ThirdPartyConfiguration { ...@@ -31,7 +30,7 @@ public class ThirdPartyConfiguration {
} }
} }
// end::code[] // @chomp:file
class AnotherComponent { class AnotherComponent {
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.constructorbinding; package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.constructorbinding;
//tag::code[]
import java.net.InetAddress; import java.net.InetAddress;
import java.util.List; import java.util.List;
...@@ -28,18 +27,22 @@ import org.springframework.boot.context.properties.bind.DefaultValue; ...@@ -28,18 +27,22 @@ import org.springframework.boot.context.properties.bind.DefaultValue;
@ConfigurationProperties("acme") @ConfigurationProperties("acme")
public class AcmeProperties { public class AcmeProperties {
// @fold:on // fields...
private final boolean enabled; private final boolean enabled;
private final InetAddress remoteAddress; private final InetAddress remoteAddress;
private final Security security; private final Security security;
// @fold:off
public AcmeProperties(boolean enabled, InetAddress remoteAddress, Security security) { public AcmeProperties(boolean enabled, InetAddress remoteAddress, Security security) {
this.enabled = enabled; this.enabled = enabled;
this.remoteAddress = remoteAddress; this.remoteAddress = remoteAddress;
this.security = security; this.security = security;
} }
// @fold:on // getters...
public boolean isEnabled() { public boolean isEnabled() {
return this.enabled; return this.enabled;
} }
...@@ -51,21 +54,26 @@ public class AcmeProperties { ...@@ -51,21 +54,26 @@ public class AcmeProperties {
public Security getSecurity() { public Security getSecurity() {
return this.security; return this.security;
} }
// @fold:off
public static class Security { public static class Security {
// @fold:on // fields...
private final String username; private final String username;
private final String password; private final String password;
private final List<String> roles; private final List<String> roles;
// @fold:off
public Security(String username, String password, @DefaultValue("USER") List<String> roles) { public Security(String username, String password, @DefaultValue("USER") List<String> roles) {
this.username = username; this.username = username;
this.password = password; this.password = password;
this.roles = roles; this.roles = roles;
} }
// @fold:on // getters...
public String getUsername() { public String getUsername() {
return this.username; return this.username;
} }
...@@ -77,8 +85,8 @@ public class AcmeProperties { ...@@ -77,8 +85,8 @@ public class AcmeProperties {
public List<String> getRoles() { public List<String> getRoles() {
return this.roles; return this.roles;
} }
// @fold:off
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.datasize.constructorbinding; package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.datasize.constructorbinding;
// tag::code[]
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.ConstructorBinding; import org.springframework.boot.context.properties.ConstructorBinding;
import org.springframework.boot.context.properties.bind.DefaultValue; import org.springframework.boot.context.properties.bind.DefaultValue;
...@@ -28,16 +27,19 @@ import org.springframework.util.unit.DataUnit; ...@@ -28,16 +27,19 @@ import org.springframework.util.unit.DataUnit;
@ConstructorBinding @ConstructorBinding
public class AppIoProperties { public class AppIoProperties {
// @fold:on // fields...
private final DataSize bufferSize; private final DataSize bufferSize;
private final DataSize sizeThreshold; private final DataSize sizeThreshold;
// @fold:off
public AppIoProperties(@DataSizeUnit(DataUnit.MEGABYTES) @DefaultValue("2MB") DataSize bufferSize, public AppIoProperties(@DataSizeUnit(DataUnit.MEGABYTES) @DefaultValue("2MB") DataSize bufferSize,
@DefaultValue("512B") DataSize sizeThreshold) { @DefaultValue("512B") DataSize sizeThreshold) {
this.bufferSize = bufferSize; this.bufferSize = bufferSize;
this.sizeThreshold = sizeThreshold; this.sizeThreshold = sizeThreshold;
} }
// @fold:on // getters...
public DataSize getBufferSize() { public DataSize getBufferSize() {
return this.bufferSize; return this.bufferSize;
} }
...@@ -45,6 +47,6 @@ public class AppIoProperties { ...@@ -45,6 +47,6 @@ public class AppIoProperties {
public DataSize getSizeThreshold() { public DataSize getSizeThreshold() {
return this.sizeThreshold; return this.sizeThreshold;
} }
// @fold:off
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.datasize.javabeanbinding; package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.datasize.javabeanbinding;
// tag::code[]
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.convert.DataSizeUnit; import org.springframework.boot.convert.DataSizeUnit;
import org.springframework.util.unit.DataSize; import org.springframework.util.unit.DataSize;
...@@ -30,6 +29,7 @@ public class AppIoProperties { ...@@ -30,6 +29,7 @@ public class AppIoProperties {
private DataSize sizeThreshold = DataSize.ofBytes(512); private DataSize sizeThreshold = DataSize.ofBytes(512);
// @fold:on // getters/setters...
public DataSize getBufferSize() { public DataSize getBufferSize() {
return this.bufferSize; return this.bufferSize;
} }
...@@ -45,6 +45,6 @@ public class AppIoProperties { ...@@ -45,6 +45,6 @@ public class AppIoProperties {
public void setSizeThreshold(DataSize sizeThreshold) { public void setSizeThreshold(DataSize sizeThreshold) {
this.sizeThreshold = sizeThreshold; this.sizeThreshold = sizeThreshold;
} }
// @fold:off
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.duration.constructorbinding; package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.duration.constructorbinding;
// tag::code[]
import java.time.Duration; import java.time.Duration;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
...@@ -29,16 +28,19 @@ import org.springframework.boot.convert.DurationUnit; ...@@ -29,16 +28,19 @@ import org.springframework.boot.convert.DurationUnit;
@ConstructorBinding @ConstructorBinding
public class AppSystemProperties { public class AppSystemProperties {
// @fold:on // fields...
private final Duration sessionTimeout; private final Duration sessionTimeout;
private final Duration readTimeout; private final Duration readTimeout;
// @fold:off
public AppSystemProperties(@DurationUnit(ChronoUnit.SECONDS) @DefaultValue("30s") Duration sessionTimeout, public AppSystemProperties(@DurationUnit(ChronoUnit.SECONDS) @DefaultValue("30s") Duration sessionTimeout,
@DefaultValue("1000ms") Duration readTimeout) { @DefaultValue("1000ms") Duration readTimeout) {
this.sessionTimeout = sessionTimeout; this.sessionTimeout = sessionTimeout;
this.readTimeout = readTimeout; this.readTimeout = readTimeout;
} }
// @fold:on // getters...
public Duration getSessionTimeout() { public Duration getSessionTimeout() {
return this.sessionTimeout; return this.sessionTimeout;
} }
...@@ -46,6 +48,6 @@ public class AppSystemProperties { ...@@ -46,6 +48,6 @@ public class AppSystemProperties {
public Duration getReadTimeout() { public Duration getReadTimeout() {
return this.readTimeout; return this.readTimeout;
} }
// @fold:off
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.duration.javabeanbinding; package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.duration.javabeanbinding;
// tag::code[]
import java.time.Duration; import java.time.Duration;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
...@@ -31,6 +30,7 @@ public class AppSystemProperties { ...@@ -31,6 +30,7 @@ public class AppSystemProperties {
private Duration readTimeout = Duration.ofMillis(1000); private Duration readTimeout = Duration.ofMillis(1000);
// @fold:on // getters / setters...
public Duration getSessionTimeout() { public Duration getSessionTimeout() {
return this.sessionTimeout; return this.sessionTimeout;
} }
...@@ -46,6 +46,6 @@ public class AppSystemProperties { ...@@ -46,6 +46,6 @@ public class AppSystemProperties {
public void setReadTimeout(Duration readTimeout) { public void setReadTimeout(Duration readTimeout) {
this.readTimeout = readTimeout; this.readTimeout = readTimeout;
} }
// @fold:off
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.enable; package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.enable;
//tag::code[]
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan; import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
...@@ -25,4 +24,3 @@ import org.springframework.boot.context.properties.ConfigurationPropertiesScan; ...@@ -25,4 +24,3 @@ import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
public class MyApplication { public class MyApplication {
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.enable; package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.enable;
//tag::code[]
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
...@@ -25,7 +24,7 @@ import org.springframework.context.annotation.Configuration; ...@@ -25,7 +24,7 @@ import org.springframework.context.annotation.Configuration;
public class MyConfiguration { public class MyConfiguration {
} }
// end::code[] // @chomp:file
class AcmeProperties { class AcmeProperties {
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.javabeanbinding; package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.javabeanbinding;
//tag::code[]
import java.net.InetAddress; import java.net.InetAddress;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
...@@ -33,6 +32,7 @@ public class AcmeProperties { ...@@ -33,6 +32,7 @@ public class AcmeProperties {
private final Security security = new Security(); private final Security security = new Security();
// @fold:on // getters / setters...
public boolean isEnabled() { public boolean isEnabled() {
return this.enabled; return this.enabled;
} }
...@@ -52,6 +52,7 @@ public class AcmeProperties { ...@@ -52,6 +52,7 @@ public class AcmeProperties {
public Security getSecurity() { public Security getSecurity() {
return this.security; return this.security;
} }
// @fold:off
public static class Security { public static class Security {
...@@ -61,6 +62,7 @@ public class AcmeProperties { ...@@ -61,6 +62,7 @@ public class AcmeProperties {
private List<String> roles = new ArrayList<>(Collections.singleton("USER")); private List<String> roles = new ArrayList<>(Collections.singleton("USER"));
// @fold:on // getters / setters...
public String getUsername() { public String getUsername() {
return this.username; return this.username;
} }
...@@ -84,8 +86,8 @@ public class AcmeProperties { ...@@ -84,8 +86,8 @@ public class AcmeProperties {
public void setRoles(List<String> roles) { public void setRoles(List<String> roles) {
this.roles = roles; this.roles = roles;
} }
// @fold:off
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.merge.list; package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.merge.list;
//tag::code[]
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -32,7 +31,7 @@ public class AcmeProperties { ...@@ -32,7 +31,7 @@ public class AcmeProperties {
} }
} }
// end::code[] // @chomp: file
class MyPojo { class MyPojo {
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.merge.map; package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.merge.map;
//tag::code[]
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
...@@ -32,7 +31,7 @@ public class AcmeProperties { ...@@ -32,7 +31,7 @@ public class AcmeProperties {
} }
} }
// end::code[] // @chomp:file
class MyPojo { class MyPojo {
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.relaxed; package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.relaxed;
//tag::code[]
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties(prefix = "acme.my-project.person") @ConfigurationProperties(prefix = "acme.my-project.person")
...@@ -33,4 +32,3 @@ public class OwnerProperties { ...@@ -33,4 +32,3 @@ public class OwnerProperties {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.use; package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.use;
//tag::code[]
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@Service @Service
...@@ -37,7 +36,7 @@ public class MyService { ...@@ -37,7 +36,7 @@ public class MyService {
// ... // ...
} }
// end::code[] // @chomp:file
class AcmeProperties { class AcmeProperties {
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.validate; package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.validate;
//tag::code[]
import java.net.InetAddress; import java.net.InetAddress;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
...@@ -31,6 +30,7 @@ public class AcmeProperties { ...@@ -31,6 +30,7 @@ public class AcmeProperties {
@NotNull @NotNull
private InetAddress remoteAddress; private InetAddress remoteAddress;
// @fold:on // getters/setters...
public InetAddress getRemoteAddress() { public InetAddress getRemoteAddress() {
return this.remoteAddress; return this.remoteAddress;
} }
...@@ -38,6 +38,6 @@ public class AcmeProperties { ...@@ -38,6 +38,6 @@ public class AcmeProperties {
public void setRemoteAddress(InetAddress remoteAddress) { public void setRemoteAddress(InetAddress remoteAddress) {
this.remoteAddress = remoteAddress; this.remoteAddress = remoteAddress;
} }
// @fold:off
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.validate.nested; package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.validate.nested;
//tag::code[]
import java.net.InetAddress; import java.net.InetAddress;
import javax.validation.Valid; import javax.validation.Valid;
...@@ -36,6 +35,7 @@ public class AcmeProperties { ...@@ -36,6 +35,7 @@ public class AcmeProperties {
@Valid @Valid
private final Security security = new Security(); private final Security security = new Security();
// @fold:on // getters/setters...
public InetAddress getRemoteAddress() { public InetAddress getRemoteAddress() {
return this.remoteAddress; return this.remoteAddress;
} }
...@@ -47,12 +47,14 @@ public class AcmeProperties { ...@@ -47,12 +47,14 @@ public class AcmeProperties {
public Security getSecurity() { public Security getSecurity() {
return this.security; return this.security;
} }
// @fold:off
public static class Security { public static class Security {
@NotEmpty @NotEmpty
private String username; private String username;
// @fold:on // getters/setters...
public String getUsername() { public String getUsername() {
return this.username; return this.username;
} }
...@@ -60,8 +62,8 @@ public class AcmeProperties { ...@@ -60,8 +62,8 @@ public class AcmeProperties {
public void setUsername(String username) { public void setUsername(String username) {
this.username = username; this.username = username;
} }
// @fold:off
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.valueinjection; package org.springframework.boot.docs.springbootfeatures.externalizedconfiguration.valueinjection;
// tag::code[]
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -29,4 +28,3 @@ public class MyBean { ...@@ -29,4 +28,3 @@ public class MyBean {
// ... // ...
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.messaging; package org.springframework.boot.docs.springbootfeatures.messaging;
// tag::code[]
import org.apache.kafka.common.serialization.Serdes; import org.apache.kafka.common.serialization.Serdes;
import org.apache.kafka.streams.KeyValue; import org.apache.kafka.streams.KeyValue;
import org.apache.kafka.streams.StreamsBuilder; import org.apache.kafka.streams.StreamsBuilder;
...@@ -41,4 +40,3 @@ public class KafkaStreamsConfiguration { ...@@ -41,4 +40,3 @@ public class KafkaStreamsConfiguration {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.nosql; package org.springframework.boot.docs.springbootfeatures.nosql;
// tag::code[]
import java.time.Duration; import java.time.Duration;
import org.springframework.boot.autoconfigure.cache.CouchbaseCacheManagerBuilderCustomizer; import org.springframework.boot.autoconfigure.cache.CouchbaseCacheManagerBuilderCustomizer;
...@@ -38,4 +37,3 @@ public class CouchbaseCacheManagerConfiguration { ...@@ -38,4 +37,3 @@ public class CouchbaseCacheManagerConfiguration {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.nosql; package org.springframework.boot.docs.springbootfeatures.nosql;
// tag::code[]
import org.neo4j.driver.Driver; import org.neo4j.driver.Driver;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
...@@ -34,4 +33,3 @@ public class Neo4jReactiveTransactionManagerConfiguration { ...@@ -34,4 +33,3 @@ public class Neo4jReactiveTransactionManagerConfiguration {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.nosql; package org.springframework.boot.docs.springbootfeatures.nosql;
// tag::code[]
import java.time.Duration; import java.time.Duration;
import org.springframework.boot.autoconfigure.cache.RedisCacheManagerBuilderCustomizer; import org.springframework.boot.autoconfigure.cache.RedisCacheManagerBuilderCustomizer;
...@@ -38,4 +37,3 @@ public class RedisCacheManagerConfiguration { ...@@ -38,4 +37,3 @@ public class RedisCacheManagerConfiguration {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.profiles; package org.springframework.boot.docs.springbootfeatures.profiles;
//tag::code[]
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile; import org.springframework.context.annotation.Profile;
...@@ -27,4 +26,3 @@ public class ProductionConfiguration { ...@@ -27,4 +26,3 @@ public class ProductionConfiguration {
// ... // ...
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.resttemplate; package org.springframework.boot.docs.springbootfeatures.resttemplate;
// tag::code[]
import java.time.Duration; import java.time.Duration;
import org.springframework.boot.autoconfigure.web.client.RestTemplateBuilderConfigurer; import org.springframework.boot.autoconfigure.web.client.RestTemplateBuilderConfigurer;
...@@ -34,4 +33,3 @@ public class RestTemplateBuilderConfiguration { ...@@ -34,4 +33,3 @@ public class RestTemplateBuilderConfiguration {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.resttemplate; package org.springframework.boot.docs.springbootfeatures.resttemplate;
// tag::code[]
import org.apache.http.HttpException; import org.apache.http.HttpException;
import org.apache.http.HttpHost; import org.apache.http.HttpHost;
import org.apache.http.HttpRequest; import org.apache.http.HttpRequest;
...@@ -56,4 +55,3 @@ public class RestTemplateProxyCustomizer implements RestTemplateCustomizer { ...@@ -56,4 +55,3 @@ public class RestTemplateProxyCustomizer implements RestTemplateCustomizer {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.security; package org.springframework.boot.docs.springbootfeatures.security;
// tag::code[]
import org.springframework.boot.autoconfigure.security.reactive.PathRequest; import org.springframework.boot.autoconfigure.security.reactive.PathRequest;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
...@@ -37,4 +36,3 @@ public class CustomWebFluxSecurityConfiguration { ...@@ -37,4 +36,3 @@ public class CustomWebFluxSecurityConfiguration {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.springapplication; package org.springframework.boot.docs.springbootfeatures.springapplication;
//tag::code[]
import java.util.List; import java.util.List;
import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationArguments;
...@@ -35,4 +34,3 @@ public class ApplicationArgumentsExample { ...@@ -35,4 +34,3 @@ public class ApplicationArgumentsExample {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.springapplication; package org.springframework.boot.docs.springbootfeatures.springapplication;
//tag::code[]
import org.springframework.boot.CommandLineRunner; import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -29,4 +28,3 @@ public class CommandLineRunnerExample implements CommandLineRunner { ...@@ -29,4 +28,3 @@ public class CommandLineRunnerExample implements CommandLineRunner {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.springapplication.availability; package org.springframework.boot.docs.springbootfeatures.springapplication.availability;
//tag::code[]
import org.springframework.boot.availability.AvailabilityChangeEvent; import org.springframework.boot.availability.AvailabilityChangeEvent;
import org.springframework.boot.availability.LivenessState; import org.springframework.boot.availability.LivenessState;
import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.ApplicationEventPublisher;
...@@ -41,7 +40,7 @@ public class LocalCacheVerifier { ...@@ -41,7 +40,7 @@ public class LocalCacheVerifier {
} }
} }
// end::code[] // @chomp:file
class CacheCompletelyBrokenException extends RuntimeException { class CacheCompletelyBrokenException extends RuntimeException {
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.springapplication.availability; package org.springframework.boot.docs.springbootfeatures.springapplication.availability;
// tag::code[]
import org.springframework.boot.availability.AvailabilityChangeEvent; import org.springframework.boot.availability.AvailabilityChangeEvent;
import org.springframework.boot.availability.ReadinessState; import org.springframework.boot.availability.ReadinessState;
import org.springframework.context.event.EventListener; import org.springframework.context.event.EventListener;
...@@ -38,4 +37,3 @@ public class ReadinessStateExporter { ...@@ -38,4 +37,3 @@ public class ReadinessStateExporter {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.springapplication.exitcode; package org.springframework.boot.docs.springbootfeatures.springapplication.exitcode;
// tag::code[]
import org.springframework.boot.ExitCodeGenerator; import org.springframework.boot.ExitCodeGenerator;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
...@@ -35,4 +34,3 @@ public class MyApplication { ...@@ -35,4 +34,3 @@ public class MyApplication {
} }
} }
// end::code[]
...@@ -23,12 +23,10 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; ...@@ -23,12 +23,10 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication @SpringBootApplication
public class MyApplication { public class MyApplication {
// tag::code[]
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication application = new SpringApplication(MyApplication.class); SpringApplication application = new SpringApplication(MyApplication.class);
application.setBannerMode(Banner.Mode.OFF); application.setBannerMode(Banner.Mode.OFF);
application.run(args); application.run(args);
} }
// end::code[]
} }
...@@ -22,10 +22,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; ...@@ -22,10 +22,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication @SpringBootApplication
public class MyApplication { public class MyApplication {
// tag::code[]
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(MyApplication.class, args); SpringApplication.run(MyApplication.class, args);
} }
// end::code[]
} }
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.testing; package org.springframework.boot.docs.springbootfeatures.testing;
// tag::code[]
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -35,4 +34,3 @@ class ApplicationArgumentTests { ...@@ -35,4 +34,3 @@ class ApplicationArgumentTests {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.testing; package org.springframework.boot.docs.springbootfeatures.testing;
// tag::code[]
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -38,4 +37,3 @@ class MockMvcTests { ...@@ -38,4 +37,3 @@ class MockMvcTests {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.testing; package org.springframework.boot.docs.springbootfeatures.testing;
// tag::code[]
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -34,4 +33,3 @@ class MockWebTestClientTests { ...@@ -34,4 +33,3 @@ class MockWebTestClientTests {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.testing; package org.springframework.boot.docs.springbootfeatures.testing;
// tag::code[]
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
...@@ -35,4 +34,3 @@ class OutputCaptureTests { ...@@ -35,4 +34,3 @@ class OutputCaptureTests {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.testing; package org.springframework.boot.docs.springbootfeatures.testing;
// tag::code[]
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -36,4 +35,3 @@ class RandomPortTestRestTemplateTests { ...@@ -36,4 +35,3 @@ class RandomPortTestRestTemplateTests {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.testing; package org.springframework.boot.docs.springbootfeatures.testing;
// tag::code[]
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -33,4 +32,3 @@ class RandomPortWebTestClientTests { ...@@ -33,4 +32,3 @@ class RandomPortWebTestClientTests {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.testing.jmx; package org.springframework.boot.docs.springbootfeatures.testing.jmx;
// tag::code[]
import javax.management.MBeanServer; import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException; import javax.management.MalformedObjectNameException;
...@@ -45,4 +44,3 @@ class SampleJmxTests { ...@@ -45,4 +44,3 @@ class SampleJmxTests {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.testing.restdocs.restassured; package org.springframework.boot.docs.springbootfeatures.testing.restdocs.restassured;
// tag::code[]
import org.springframework.boot.test.autoconfigure.restdocs.RestDocsRestAssuredConfigurationCustomizer; import org.springframework.boot.test.autoconfigure.restdocs.RestDocsRestAssuredConfigurationCustomizer;
import org.springframework.boot.test.context.TestConfiguration; import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.restdocs.restassured3.RestAssuredRestDocumentationConfigurer; import org.springframework.restdocs.restassured3.RestAssuredRestDocumentationConfigurer;
...@@ -31,4 +30,3 @@ public class AdvancedRestDocsConfiguration implements RestDocsRestAssuredConfigu ...@@ -31,4 +30,3 @@ public class AdvancedRestDocsConfiguration implements RestDocsRestAssuredConfigu
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.testing.restdocs.restassured; package org.springframework.boot.docs.springbootfeatures.testing.restdocs.restassured;
// tag::code[]
import io.restassured.specification.RequestSpecification; import io.restassured.specification.RequestSpecification;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
...@@ -36,9 +35,15 @@ class UserDocumentationTests { ...@@ -36,9 +35,15 @@ class UserDocumentationTests {
@Test @Test
void listUsers(@Autowired RequestSpecification documentationSpec, @LocalServerPort int port) { void listUsers(@Autowired RequestSpecification documentationSpec, @LocalServerPort int port) {
given(documentationSpec).filter(document("list-users")).when().port(port).get("/").then().assertThat() // @formatter:off
.statusCode(is(200)); given(documentationSpec)
.filter(document("list-users"))
.when()
.port(port)
.get("/")
.then().assertThat()
.statusCode(is(200));
// @formatter:on
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.testing.restdocs.webclient; package org.springframework.boot.docs.springbootfeatures.testing.restdocs.webclient;
// tag::code[]
import org.springframework.boot.test.autoconfigure.restdocs.RestDocsWebTestClientConfigurationCustomizer; import org.springframework.boot.test.autoconfigure.restdocs.RestDocsWebTestClientConfigurationCustomizer;
import org.springframework.boot.test.context.TestConfiguration; import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.restdocs.webtestclient.WebTestClientRestDocumentationConfigurer; import org.springframework.restdocs.webtestclient.WebTestClientRestDocumentationConfigurer;
...@@ -30,4 +29,3 @@ public class AdvancedRestDocsConfiguration implements RestDocsWebTestClientConfi ...@@ -30,4 +29,3 @@ public class AdvancedRestDocsConfiguration implements RestDocsWebTestClientConfi
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.testing.restdocs.webclient; package org.springframework.boot.docs.springbootfeatures.testing.restdocs.webclient;
// tag::code[]
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -35,9 +34,15 @@ class UsersDocumentationTests { ...@@ -35,9 +34,15 @@ class UsersDocumentationTests {
@Test @Test
void listUsers() { void listUsers() {
this.webTestClient.get().uri("/").exchange().expectStatus().isOk().expectBody() // @formatter:off
.consumeWith(document("list-users")); this.webTestClient
.get().uri("/")
.exchange()
.expectStatus()
.isOk()
.expectBody()
.consumeWith(document("list-users"));
// @formatter:on
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.testing.webclient; package org.springframework.boot.docs.springbootfeatures.testing.webclient;
// tag::code[]
import java.time.Duration; import java.time.Duration;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
...@@ -56,4 +55,3 @@ class SampleWebClientTests { ...@@ -56,4 +55,3 @@ class SampleWebClientTests {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.webapplications; package org.springframework.boot.docs.springbootfeatures.webapplications;
//tag::code[]
import java.io.IOException; import java.io.IOException;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters; import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
...@@ -40,7 +39,7 @@ public class HttpMessageConvertersConfiguration { ...@@ -40,7 +39,7 @@ public class HttpMessageConvertersConfiguration {
} }
} }
// end::code[] // @chomp:file
class AdditionalHttpMessageConverter extends AbstractHttpMessageConverter<Object> { class AdditionalHttpMessageConverter extends AbstractHttpMessageConverter<Object> {
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.webapplications; package org.springframework.boot.docs.springbootfeatures.webapplications;
// tag::code[]
import java.time.Duration; import java.time.Duration;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
...@@ -32,4 +31,3 @@ public class TomcatServerCustomizer implements WebServerFactoryCustomizer<Tomcat ...@@ -32,4 +31,3 @@ public class TomcatServerCustomizer implements WebServerFactoryCustomizer<Tomcat
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.webapplications.json; package org.springframework.boot.docs.springbootfeatures.webapplications.json;
//tag::code[]
import java.io.IOException; import java.io.IOException;
import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonGenerator;
...@@ -59,7 +58,7 @@ public class MyJsonComponent { ...@@ -59,7 +58,7 @@ public class MyJsonComponent {
} }
} }
// end::code[] // @chomp:file
class MyObject { class MyObject {
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.webapplications.json.object; package org.springframework.boot.docs.springbootfeatures.webapplications.json.object;
//tag::code[]
import java.io.IOException; import java.io.IOException;
import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonGenerator;
...@@ -57,7 +56,7 @@ public class MyJsonComponent { ...@@ -57,7 +56,7 @@ public class MyJsonComponent {
} }
} }
// end::code[] // @chomp:file
class MyObject { class MyObject {
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.webapplications.servlet; package org.springframework.boot.docs.springbootfeatures.webapplications.servlet;
//tag::code[]
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.CorsRegistry;
...@@ -38,4 +37,3 @@ public class CorsConfiguration { ...@@ -38,4 +37,3 @@ public class CorsConfiguration {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.webapplications.servlet; package org.springframework.boot.docs.springbootfeatures.webapplications.servlet;
//tag::code[]
import org.springframework.boot.web.server.ErrorPage; import org.springframework.boot.web.server.ErrorPage;
import org.springframework.boot.web.server.ErrorPageRegistrar; import org.springframework.boot.web.server.ErrorPageRegistrar;
import org.springframework.boot.web.server.ErrorPageRegistry; import org.springframework.boot.web.server.ErrorPageRegistry;
...@@ -37,4 +36,3 @@ public class ErrorPageConfiguration { ...@@ -37,4 +36,3 @@ public class ErrorPageConfiguration {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.webapplications.servlet; package org.springframework.boot.docs.springbootfeatures.webapplications.servlet;
//tag::code[]
import javax.servlet.RequestDispatcher; import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -44,7 +43,7 @@ public class MyControllerAdvice extends ResponseEntityExceptionHandler { ...@@ -44,7 +43,7 @@ public class MyControllerAdvice extends ResponseEntityExceptionHandler {
} }
} }
// end::code[] // @chomp:file
class AcmeController { class AcmeController {
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.webapplications.servlet; package org.springframework.boot.docs.springbootfeatures.webapplications.servlet;
//tag::code[]
import java.util.Map; import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -38,4 +37,3 @@ public class MyErrorViewResolver implements ErrorViewResolver { ...@@ -38,4 +37,3 @@ public class MyErrorViewResolver implements ErrorViewResolver {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.webapplications.servlet; package org.springframework.boot.docs.springbootfeatures.webapplications.servlet;
//tag::code[]
import java.util.List; import java.util.List;
import org.springframework.data.repository.CrudRepository; import org.springframework.data.repository.CrudRepository;
...@@ -55,7 +54,7 @@ public class MyRestController { ...@@ -55,7 +54,7 @@ public class MyRestController {
} }
} }
// end::code[] // @chomp:file
interface UserRepository extends CrudRepository<User, Long> { interface UserRepository extends CrudRepository<User, Long> {
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.webapplications.servlet; package org.springframework.boot.docs.springbootfeatures.webapplications.servlet;
//tag::code[]
import java.io.IOException; import java.io.IOException;
import java.util.EnumSet; import java.util.EnumSet;
...@@ -43,7 +42,7 @@ public class ServletFilterConfiguration { ...@@ -43,7 +42,7 @@ public class ServletFilterConfiguration {
} }
} }
// end::code[] // @chomp:file
class MyFilter extends GenericFilterBean { class MyFilter extends GenericFilterBean {
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.webapplications.webflux; package org.springframework.boot.docs.springbootfeatures.webapplications.webflux;
//tag::code[]
import org.springframework.boot.web.codec.CodecCustomizer; import org.springframework.boot.web.codec.CodecCustomizer;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
...@@ -35,4 +34,3 @@ public class CodecConfiguration { ...@@ -35,4 +34,3 @@ public class CodecConfiguration {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.webapplications.webflux; package org.springframework.boot.docs.springbootfeatures.webapplications.webflux;
//tag::code[]
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import org.springframework.boot.autoconfigure.web.WebProperties.Resources; import org.springframework.boot.autoconfigure.web.WebProperties.Resources;
...@@ -56,4 +55,3 @@ public class CustomErrorWebExceptionHandler extends AbstractErrorWebExceptionHan ...@@ -56,4 +55,3 @@ public class CustomErrorWebExceptionHandler extends AbstractErrorWebExceptionHan
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.webapplications.webflux; package org.springframework.boot.docs.springbootfeatures.webapplications.webflux;
//tag::code[]
import java.util.List; import java.util.List;
import reactor.core.publisher.Flux; import reactor.core.publisher.Flux;
...@@ -58,7 +57,7 @@ public class MyRestController { ...@@ -58,7 +57,7 @@ public class MyRestController {
} }
} }
// end::code[] // @chomp:file
interface UserRepository extends ReactiveCrudRepository<User, Long> { interface UserRepository extends ReactiveCrudRepository<User, Long> {
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.webapplications.webflux.fn; package org.springframework.boot.docs.springbootfeatures.webapplications.webflux.fn;
//tag::code[]
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
...@@ -45,4 +44,3 @@ public class RoutingConfiguration { ...@@ -45,4 +44,3 @@ public class RoutingConfiguration {
} }
} }
// end::code[]
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
package org.springframework.boot.docs.springbootfeatures.webapplications.webflux.fn; package org.springframework.boot.docs.springbootfeatures.webapplications.webflux.fn;
//tag::code[]
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -27,19 +26,15 @@ import org.springframework.web.reactive.function.server.ServerResponse; ...@@ -27,19 +26,15 @@ import org.springframework.web.reactive.function.server.ServerResponse;
public class UserHandler { public class UserHandler {
public Mono<ServerResponse> getUser(ServerRequest request) { public Mono<ServerResponse> getUser(ServerRequest request) {
// ... /**/ return ServerResponse.ok().build();
return ServerResponse.ok().build();
} }
public Mono<ServerResponse> getUserCustomers(ServerRequest request) { public Mono<ServerResponse> getUserCustomers(ServerRequest request) {
// ... /**/ return ServerResponse.ok().build();
return ServerResponse.ok().build();
} }
public Mono<ServerResponse> deleteUser(ServerRequest request) { public Mono<ServerResponse> deleteUser(ServerRequest request) {
// ... /**/ return ServerResponse.ok().build();
return ServerResponse.ok().build();
} }
} }
// end::code[]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment