Commit b314d848 authored by Phillip Webb's avatar Phillip Webb

Polish docs code

See gh-6313
parent 09e85806
......@@ -52,5 +52,5 @@ For Tomcat, the following configuration can be added:
[source,java,indent=0]
----
include::{docs-java}/actuator/cloudfoundry/customcontextpath/CloudFoundryCustomContextPathConfiguration.java[tag=*]
include::{docs-java}/actuator/cloudfoundry/customcontextpath/CloudFoundryCustomContextPathConfiguration.java[]
----
......@@ -939,7 +939,7 @@ To replace the default metric tags, define a `MongoConnectionPoolTagsProvider` b
[source,java,indent=0]
----
include::{docs-java}/actuator/metrics/supported/mongodb/connectionpool/SampleConnectionPoolTagsProviderConfiguration.java[tag=*]
include::{docs-java}/actuator/metrics/supported/mongodb/connectionpool/SampleConnectionPoolTagsProviderConfiguration.java[]
----
To disable the auto-configured connection pool metrics, set the following property:
......@@ -1024,14 +1024,14 @@ To register custom metrics, inject `MeterRegistry` into your component, as shown
[source,java,indent=0]
----
include::{docs-java}/actuator/metrics/registeringcustom/MetricsMeterRegistryInjection.java[tag=*]
include::{docs-java}/actuator/metrics/registeringcustom/MetricsMeterRegistryInjection.java[]
----
If your metrics depend on other beans, it is recommended that you use a `MeterBinder` to register them, as shown in the following example:
[source,java,indent=0]
----
include::{docs-java}/actuator/metrics/registeringcustom/SampleMeterBinderConfiguration.java[tag=*]
include::{docs-java}/actuator/metrics/registeringcustom/SampleMeterBinderConfiguration.java[]
----
Using a `MeterBinder` ensures that the correct dependency relationships are set up and that the bean is available when the metric's value is retrieved.
......@@ -1049,7 +1049,7 @@ For example, if you want to rename the `mytag.region` tag to `mytag.area` for al
[source,java,indent=0]
----
include::{docs-java}/actuator/metrics/customizing/MetricsFilterConfiguration.java[tag=*]
include::{docs-java}/actuator/metrics/customizing/MetricsFilterConfiguration.java[]
----
NOTE: By default, all `MeterFilter` beans will be automatically bound to the Spring-managed `MeterRegistry`.
......
......@@ -183,7 +183,7 @@ The following example shows how to use the `ConditionEvaluationReportLoggingList
[source,java,indent=0]
----
include::{docs-java}/features/developingautoconfiguration/testing/ConditionEvaluationReportTests.java[tag=*]
include::{docs-java}/features/developingautoconfiguration/testing/ConditionEvaluationReportTests.java[]
----
......
......@@ -403,7 +403,7 @@ For example, to use the `BufferingApplicationStartup`, you could write:
[source,java,indent=0]
----
include::{docs-java}/features/springapplication/startuptracking/MyApplication.java[tag=*]
include::{docs-java}/features/springapplication/startuptracking/MyApplication.java[]
----
The first available implementation, `FlightRecorderApplicationStartup` is provided by Spring Framework.
......
......@@ -430,7 +430,7 @@ The following example shows how to manually override the database port while the
[source,java,indent=0]
----
include::{docs-java}/features/sql/r2dbc/CustomizeR2dbcPortConfiguration.java[tag=*]
include::{docs-java}/features/sql/r2dbc/MyR2dbcPortConfiguration.java[]
----
The following examples show how to set some PostgreSQL connection options:
......
......@@ -908,7 +908,7 @@ You can call it with `key=value` strings, as follows:
[source,java,indent=0]
----
include::{docs-java}/features/testing/utilities/testpropertyvalues/MyEnvironmentTests.java[tag=*]
include::{docs-java}/features/testing/utilities/testpropertyvalues/MyEnvironmentTests.java[]
----
......
......@@ -68,5 +68,5 @@ The following example shows one way to write such an exporter:
[source,java,indent=0,subs="verbatim,quotes,attributes"]
----
include::{docs-java}/howto/actuator/maphealthindicatorstometrics/MetricsHealthMicrometerExport.java[tag=*]
include::{docs-java}/howto/actuator/maphealthindicatorstometrics/MetricsHealthMicrometerExport.java[]
----
......@@ -80,7 +80,7 @@ For instance, the following example loads a YAML configuration file from the cla
[source,java,indent=0]
----
include::{docs-java}/howto/application/customizetheenvironmentorapplicationcontext/MyEnvironmentPostProcessor.java[tag=*]
include::{docs-java}/howto/application/customizetheenvironmentorapplicationcontext/MyEnvironmentPostProcessor.java[]
----
TIP: The `Environment` has already been prepared with all the usual property sources that Spring Boot loads by default.
......
......@@ -43,7 +43,7 @@ The following example shows how to create a data source by using a `DataSourceBu
[source,java,indent=0,subs="verbatim,quotes,attributes"]
----
include::{docs-java}/howto/dataaccess/configurecustomdatasource/BasicDataSourceConfiguration.java[tag=*]
include::{docs-java}/howto/dataaccess/configurecustomdatasource/BasicDataSourceConfiguration.java[]
----
To run an app with that `DataSource`, all you need is the connection information.
......@@ -84,7 +84,7 @@ The following example shows how create a `HikariDataSource` with `DataSourceBuil
[source,java,indent=0,subs="verbatim,quotes,attributes"]
----
include::{docs-java}/howto/dataaccess/configurecustomdatasource/SimpleDataSourceConfiguration.java[tag=*]
include::{docs-java}/howto/dataaccess/configurecustomdatasource/SimpleDataSourceConfiguration.java[]
----
You can even go further by leveraging what `DataSourceProperties` does for you -- that is, by providing a default embedded database with a sensible username and password if no URL is provided.
......@@ -94,7 +94,7 @@ To avoid that, you can redefine a custom `DataSourceProperties` on your custom n
[source,java,indent=0,subs="verbatim,quotes,attributes"]
----
include::{docs-java}/howto/dataaccess/configurecustomdatasource/ConfigurableDataSourceConfiguration.java[tag=*]
include::{docs-java}/howto/dataaccess/configurecustomdatasource/ConfigurableDataSourceConfiguration.java[]
----
This setup puts you _in sync_ with what Spring Boot does for you by default, except that a dedicated connection pool is chosen (in code) and its settings are exposed in the `app.datasource.configuration` sub namespace.
......@@ -131,7 +131,7 @@ In the following example, we provide the _exact_ same feature set as the auto-co
[source,java,indent=0,subs="verbatim,quotes,attributes"]
----
include::{docs-java}/howto/dataaccess/configuretwodatasources/SimpleDataSourcesConfiguration.java[tag=*]
include::{docs-java}/howto/dataaccess/configuretwodatasources/SimpleDataSourcesConfiguration.java[]
----
TIP: `firstDataSourceProperties` has to be flagged as `@Primary` so that the database initializer feature uses your copy (if you use the initializer).
......@@ -161,7 +161,7 @@ You can apply the same concept to the secondary `DataSource` as well, as shown i
[source,java,indent=0,subs="verbatim,quotes,attributes"]
----
include::{docs-java}/howto/dataaccess/configuretwodatasources/CompleteDataSourcesConfiguration.java[tag=*]
include::{docs-java}/howto/dataaccess/configuretwodatasources/CompleteDataSourcesConfiguration.java[]
----
The preceding example configures two data sources on custom namespaces with the same logic as Spring Boot would use in auto-configuration.
......@@ -255,7 +255,7 @@ This implementation provides the same table structure as Hibernate 4: all dots a
[source,java,indent=0]
----
include::{docs-java}/howto/dataaccess/configurehibernatenamingstrategy/CaseSensitiveSpringPhysicalNamingStrategyConfiguration.java[tag=*]
include::{docs-java}/howto/dataaccess/configurehibernatenamingstrategy/CaseSensitiveSpringPhysicalNamingStrategyConfiguration.java[]
----
If you prefer to use Hibernate 5's default instead, set the following property:
......@@ -289,7 +289,7 @@ Then, add a `HibernatePropertiesCustomizer` bean as shown in the following examp
[source,java,indent=0]
----
include::{docs-java}/howto/dataaccess/configurehibernatesecondlevelcaching/HibernateSecondLevelCacheConfiguration.java[tag=*]
include::{docs-java}/howto/dataaccess/configurehibernatesecondlevelcaching/HibernateSecondLevelCacheConfiguration.java[]
----
This customizer will configure Hibernate to use the same `CacheManager` as the one that the application uses.
......@@ -322,7 +322,7 @@ You can also reuse `JpaProperties` to bind settings for each `EntityManagerFacto
[source,java,pending-extract=true,indent=0,subs="verbatim,quotes,attributes"]
----
include::{docs-java}/howto/dataaccess/usemultipleentitymanagers/CustomEntityManagerFactoryExample.java[tag=*]
include::{docs-java}/howto/dataaccess/usemultipleentitymanagers/CustomEntityManagerFactoryConfiguration.java[]
----
The example above creates an `EntityManagerFactory` using a `DataSource` bean named `firstDataSource`.
......@@ -413,7 +413,7 @@ For example, if you use Hibernate Search with Elasticsearch as its index manager
[source,java,indent=0]
----
include::{docs-java}/howto/dataaccess/configureacomponentthatisusedbyjpa/ElasticsearchEntityManagerFactoryDependsOnPostProcessor.java[tag=*]
include::{docs-java}/howto/dataaccess/configureacomponentthatisusedbyjpa/ElasticsearchEntityManagerFactoryDependsOnPostProcessor.java[]
----
......
......@@ -22,7 +22,7 @@ The following example configures a 60 second connect timeout and adds a `ReadTim
[source,java,indent=0]
----
include::{docs-java}/howto/httpclients/webclientreactornettycustomization/CustomizeReactorNettyClientConfiguration.java[tag=*]
include::{docs-java}/howto/httpclients/webclientreactornettycustomization/MyReactorNettyClientConfiguration.java[]
----
TIP: Note the use of `ReactorResourceFactory` for the connection provider and event loop resources.
......
......@@ -13,7 +13,7 @@ The `jersey.config.server.response.setStatusOverSendError` property must be set
[source,java,indent=0]
----
include::{docs-java}/howto/jersey/springsecurity/JerseySetStatusOverSendErrorConfig.java[tag=*]
include::{docs-java}/howto/jersey/springsecurity/JerseySetStatusOverSendErrorConfig.java[]
----
......
......@@ -464,7 +464,7 @@ You can add an `org.apache.catalina.connector.Connector` to the `TomcatServletWe
[source,java,indent=0,subs="verbatim,quotes,attributes"]
----
include::{docs-java}/howto/webserver/enablemultipleconnectorsintomcat/TomcatMultipleConnectorsConfiguration.java[tag=*]
include::{docs-java}/howto/webserver/enablemultipleconnectorsintomcat/TomcatMultipleConnectorsConfiguration.java[]
----
......@@ -484,7 +484,7 @@ To switch to the `LegacyCookieProcessor`, use an `WebServerFactoryCustomizer` be
[source,java,indent=0]
----
include::{docs-java}/howto/webserver/usetomcatlegacycookieprocessor/LegacyCookieProcessorConfiguration.java[tag=*]
include::{docs-java}/howto/webserver/usetomcatlegacycookieprocessor/LegacyCookieProcessorConfiguration.java[]
----
......@@ -511,7 +511,7 @@ Add an `UndertowBuilderCustomizer` to the `UndertowServletWebServerFactory` and
[source,java,indent=0,subs="verbatim,quotes,attributes"]
----
include::{docs-java}/howto/webserver/enablemultiplelistenersinundertow/UndertowMultipleListenersConfiguration.java[tag=*]
include::{docs-java}/howto/webserver/enablemultiplelistenersinundertow/UndertowMultipleListenersConfiguration.java[]
----
......
......@@ -16,7 +16,6 @@
package org.springframework.boot.docs.actuator.cloudfoundry.customcontextpath;
// tag::code[]
import java.io.IOException;
import java.util.Collections;
......@@ -75,4 +74,3 @@ public class CloudFoundryCustomContextPathConfiguration {
}
}
// end::code[]
......@@ -16,7 +16,6 @@
package org.springframework.boot.docs.actuator.metrics.customizing;
// tag::code[]
import io.micrometer.core.instrument.config.MeterFilter;
import org.springframework.context.annotation.Bean;
......@@ -31,4 +30,3 @@ public class MetricsFilterConfiguration {
}
}
// end::code[]
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.actuator.metrics.registeringcustom;
import java.util.Collections;
import java.util.List;
class Dictionary {
static Dictionary load() {
return new Dictionary();
}
List<String> getWords() {
return Collections.emptyList();
}
}
......@@ -16,10 +16,6 @@
package org.springframework.boot.docs.actuator.metrics.registeringcustom;
//tag::code[]
import java.util.Collections;
import java.util.List;
import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.Tags;
......@@ -36,16 +32,3 @@ public class MetricsMeterRegistryInjection {
}
}
// end::code[]
class Dictionary {
static Dictionary load() {
return new Dictionary();
}
List<String> getWords() {
return Collections.emptyList();
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.actuator.metrics.registeringcustom;
class Queue {
int size() {
return 5;
}
}
......@@ -16,7 +16,6 @@
package org.springframework.boot.docs.actuator.metrics.registeringcustom;
// tag::code[]
import io.micrometer.core.instrument.Gauge;
import io.micrometer.core.instrument.binder.MeterBinder;
......@@ -30,12 +29,3 @@ public class SampleMeterBinderConfiguration {
}
}
// end::code[]
class Queue {
int size() {
return 5;
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.command;
import com.mongodb.event.CommandEvent;
import io.micrometer.core.instrument.Tag;
import io.micrometer.core.instrument.binder.mongodb.MongoCommandTagsProvider;
class CustomCommandTagsProvider implements MongoCommandTagsProvider {
@Override
public Iterable<Tag> commandTags(CommandEvent commandEvent) {
return java.util.Collections.emptyList();
}
}
......@@ -16,8 +16,6 @@
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.command;
import com.mongodb.event.CommandEvent;
import io.micrometer.core.instrument.Tag;
import io.micrometer.core.instrument.binder.mongodb.MongoCommandTagsProvider;
import org.springframework.context.annotation.Bean;
......@@ -32,13 +30,3 @@ public class SampleCommandTagsProviderConfiguration {
}
}
// @chomp:file
class CustomCommandTagsProvider implements MongoCommandTagsProvider {
@Override
public Iterable<Tag> commandTags(CommandEvent commandEvent) {
return java.util.Collections.emptyList();
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.connectionpool;
import com.mongodb.event.ConnectionPoolCreatedEvent;
import io.micrometer.core.instrument.Tag;
import io.micrometer.core.instrument.binder.mongodb.MongoConnectionPoolTagsProvider;
class CustomConnectionPoolTagsProvider implements MongoConnectionPoolTagsProvider {
@Override
public Iterable<Tag> connectionPoolTags(ConnectionPoolCreatedEvent event) {
return java.util.Collections.emptyList();
}
}
......@@ -16,9 +16,6 @@
package org.springframework.boot.docs.actuator.metrics.supported.mongodb.connectionpool;
// tag::code[]
import com.mongodb.event.ConnectionPoolCreatedEvent;
import io.micrometer.core.instrument.Tag;
import io.micrometer.core.instrument.binder.mongodb.MongoConnectionPoolTagsProvider;
import org.springframework.context.annotation.Bean;
......@@ -33,13 +30,3 @@ public class SampleConnectionPoolTagsProviderConfiguration {
}
}
// end::code[]
class CustomConnectionPoolTagsProvider implements MongoConnectionPoolTagsProvider {
@Override
public Iterable<Tag> connectionPoolTags(ConnectionPoolCreatedEvent event) {
return java.util.Collections.emptyList();
}
}
......@@ -24,7 +24,6 @@ import org.springframework.boot.test.context.runner.ApplicationContextRunner;
public class ConditionEvaluationReportTests {
// start::code[]
@Test
void autoConfigTest() {
ConditionEvaluationReportLoggingListener initializer = new ConditionEvaluationReportLoggingListener(
......@@ -33,6 +32,5 @@ public class ConditionEvaluationReportTests {
// Test something...
});
}
// end::code[]
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.developingwebapplications.springmvc;
class Customer {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.developingwebapplications.springmvc;
import java.util.List;
import org.springframework.data.repository.CrudRepository;
interface CustomerRepository extends CrudRepository<Customer, Long> {
List<Customer> findByUser(User user);
}
......@@ -18,7 +18,6 @@ package org.springframework.boot.docs.features.developingwebapplications.springm
import java.util.List;
import org.springframework.data.repository.CrudRepository;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -54,26 +53,3 @@ public class MyRestController {
}
}
// @chomp:file
interface UserRepository extends CrudRepository<User, Long> {
}
interface CustomerRepository extends CrudRepository<Customer, Long> {
List<Customer> findByUser(User user);
}
class User {
List<Customer> getCustomers() {
return null;
}
}
class Customer {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.developingwebapplications.springmvc;
import java.util.List;
class User {
List<Customer> getCustomers() {
return null;
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.developingwebapplications.springmvc;
import org.springframework.data.repository.CrudRepository;
interface UserRepository extends CrudRepository<User, Long> {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.developingwebapplications.springmvc.errorhandling;
class AcmeController {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.developingwebapplications.springmvc.errorhandling;
class CustomException extends RuntimeException {
}
......@@ -32,8 +32,3 @@ public class MyController {
}
}
// @chomp:file
class CustomException extends RuntimeException {
}
......@@ -43,19 +43,3 @@ public class MyControllerAdvice extends ResponseEntityExceptionHandler {
}
}
// @chomp:file
class AcmeController {
}
class MyException extends RuntimeException {
}
class MyErrorBody {
MyErrorBody(int value, String message) {
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.developingwebapplications.springmvc.errorhandling;
class MyErrorBody {
MyErrorBody(int value, String message) {
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.developingwebapplications.springmvc.errorhandling;
class MyException extends RuntimeException {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.developingwebapplications.springmvc.errorhandling.errorpageswithoutspringmvc;
import java.io.IOException;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import org.springframework.web.filter.GenericFilterBean;
class MyFilter extends GenericFilterBean {
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
}
}
......@@ -16,19 +16,13 @@
package org.springframework.boot.docs.features.developingwebapplications.springmvc.errorhandling.errorpageswithoutspringmvc;
import java.io.IOException;
import java.util.EnumSet;
import javax.servlet.DispatcherType;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.GenericFilterBean;
@Configuration
public class ServletFilterConfiguration {
......@@ -42,13 +36,3 @@ public class ServletFilterConfiguration {
}
}
// @chomp:file
class MyFilter extends GenericFilterBean {
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
}
}
......@@ -58,20 +58,3 @@ public class MyJsonComponent {
}
}
// @chomp:file
class MyObject {
MyObject(String name, int age) {
}
String getName() {
return null;
}
Integer getAge() {
return null;
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.developingwebapplications.springmvc.json;
class MyObject {
MyObject(String name, int age) {
}
String getName() {
return null;
}
Integer getAge() {
return null;
}
}
......@@ -56,20 +56,3 @@ public class MyJsonComponent {
}
}
// @chomp:file
class MyObject {
MyObject(String name, int age) {
}
String getName() {
return null;
}
Integer getAge() {
return null;
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.developingwebapplications.springmvc.json.object;
class MyObject {
MyObject(String name, int age) {
}
String getName() {
return null;
}
Integer getAge() {
return null;
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.developingwebapplications.springmvc.messageconverters;
import java.io.IOException;
import org.springframework.http.HttpInputMessage;
import org.springframework.http.HttpOutputMessage;
import org.springframework.http.converter.AbstractHttpMessageConverter;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.http.converter.HttpMessageNotWritableException;
class AdditionalHttpMessageConverter extends AbstractHttpMessageConverter<Object> {
@Override
protected boolean supports(Class<?> clazz) {
return false;
}
@Override
protected Object readInternal(Class<?> clazz, HttpInputMessage inputMessage)
throws IOException, HttpMessageNotReadableException {
return null;
}
@Override
protected void writeInternal(Object t, HttpOutputMessage outputMessage)
throws IOException, HttpMessageNotWritableException {
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.developingwebapplications.springmvc.messageconverters;
class AnotherHttpMessageConverter extends AdditionalHttpMessageConverter {
}
......@@ -16,17 +16,10 @@
package org.springframework.boot.docs.features.developingwebapplications.springmvc.messageconverters;
import java.io.IOException;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpInputMessage;
import org.springframework.http.HttpOutputMessage;
import org.springframework.http.converter.AbstractHttpMessageConverter;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.http.converter.HttpMessageNotWritableException;
@Configuration(proxyBeanMethods = false)
public class HttpMessageConvertersConfiguration {
......@@ -39,28 +32,3 @@ public class HttpMessageConvertersConfiguration {
}
}
// @chomp:file
class AdditionalHttpMessageConverter extends AbstractHttpMessageConverter<Object> {
@Override
protected boolean supports(Class<?> clazz) {
return false;
}
@Override
protected Object readInternal(Class<?> clazz, HttpInputMessage inputMessage)
throws IOException, HttpMessageNotReadableException {
return null;
}
@Override
protected void writeInternal(Object t, HttpOutputMessage outputMessage)
throws IOException, HttpMessageNotWritableException {
}
}
class AnotherHttpMessageConverter extends AdditionalHttpMessageConverter {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.developingwebapplications.springwebflux;
class Customer {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.developingwebapplications.springwebflux;
import reactor.core.publisher.Flux;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
interface CustomerRepository extends ReactiveCrudRepository<Customer, Long> {
Flux<Customer> findByUser(User user);
}
......@@ -16,12 +16,9 @@
package org.springframework.boot.docs.features.developingwebapplications.springwebflux;
import java.util.List;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -57,26 +54,3 @@ public class MyRestController {
}
}
// @chomp:file
interface UserRepository extends ReactiveCrudRepository<User, Long> {
}
interface CustomerRepository extends ReactiveCrudRepository<Customer, Long> {
Flux<Customer> findByUser(User user);
}
class User {
List<Customer> getCustomers() {
return null;
}
}
class Customer {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.developingwebapplications.springwebflux;
import java.util.List;
class User {
List<Customer> getCustomers() {
return null;
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.developingwebapplications.springwebflux;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
interface UserRepository extends ReactiveCrudRepository<User, Long> {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.externalconfig.typesafeconfigurationproperties.enablingannotatedtypes;
class AcmeProperties {
}
......@@ -24,8 +24,3 @@ import org.springframework.context.annotation.Configuration;
public class MyConfiguration {
}
// @chomp:file
class AcmeProperties {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.externalconfig.typesafeconfigurationproperties.mergingcomplextypes.list;
class MyPojo {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.externalconfig.typesafeconfigurationproperties.mergingcomplextypes.map;
class MyPojo {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.externalconfig.typesafeconfigurationproperties.thirdpartyconfiguration;
class AnotherComponent {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.externalconfig.typesafeconfigurationproperties.usingannotatedtypes;
class AcmeProperties {
Object getRemoteAddress() {
return null;
}
}
......@@ -36,22 +36,3 @@ public class MyService {
// ...
}
// @chomp:file
class AcmeProperties {
Object getRemoteAddress() {
return null;
}
}
class Server {
Server(Object remoteAddress) {
}
void start() {
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.externalconfig.typesafeconfigurationproperties.usingannotatedtypes;
class Server {
Server(Object remoteAddress) {
}
void start() {
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.messaging.amqp.receiving.custom;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageProperties;
import org.springframework.amqp.support.converter.MessageConversionException;
import org.springframework.amqp.support.converter.MessageConverter;
class MyMessageConverter implements MessageConverter {
@Override
public Message toMessage(Object object, MessageProperties messageProperties) throws MessageConversionException {
return null;
}
@Override
public Object fromMessage(Message message) throws MessageConversionException {
return null;
}
}
......@@ -16,12 +16,8 @@
package org.springframework.boot.docs.features.messaging.amqp.receiving.custom;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageProperties;
import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.amqp.support.converter.MessageConversionException;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.boot.autoconfigure.amqp.SimpleRabbitListenerContainerFactoryConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......@@ -43,18 +39,3 @@ public class RabbitConfiguration {
}
}
// @chomp:file
class MyMessageConverter implements MessageConverter {
@Override
public Message toMessage(Object object, MessageProperties messageProperties) throws MessageConversionException {
return null;
}
@Override
public Object fromMessage(Message message) throws MessageConversionException {
return null;
}
}
......@@ -17,16 +17,11 @@
package org.springframework.boot.docs.features.messaging.jms.receiving.custom;
import javax.jms.ConnectionFactory;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Session;
import org.springframework.boot.autoconfigure.jms.DefaultJmsListenerContainerFactoryConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.config.DefaultJmsListenerContainerFactory;
import org.springframework.jms.support.converter.MessageConversionException;
import org.springframework.jms.support.converter.MessageConverter;
@Configuration(proxyBeanMethods = false)
public class JmsConfiguration {
......@@ -45,18 +40,3 @@ public class JmsConfiguration {
}
}
// @chomp:file
class MyMessageConverter implements MessageConverter {
@Override
public Message toMessage(Object object, Session session) throws JMSException, MessageConversionException {
return null;
}
@Override
public Object fromMessage(Message message) throws JMSException, MessageConversionException {
return null;
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.messaging.jms.receiving.custom;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Session;
import org.springframework.jms.support.converter.MessageConversionException;
import org.springframework.jms.support.converter.MessageConverter;
class MyMessageConverter implements MessageConverter {
@Override
public Message toMessage(Object object, Session session) throws JMSException, MessageConversionException {
return null;
}
@Override
public Object fromMessage(Message message) throws JMSException, MessageConversionException {
return null;
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.nosql.cassandra.connecting;
class User {
}
......@@ -20,7 +20,6 @@ import org.assertj.core.util.Arrays;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.convert.converter.Converter;
import org.springframework.data.couchbase.config.BeanNames;
import org.springframework.data.couchbase.core.convert.CouchbaseCustomConversions;
......@@ -33,17 +32,3 @@ public class CouchbaseConversionsConfiguration {
}
}
// @chomp:file
class CouchbaseProperties {
}
class MyConverter implements Converter<CouchbaseProperties, Boolean> {
@Override
public Boolean convert(CouchbaseProperties value) {
return true;
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.nosql.couchbase.repositories;
class CouchbaseProperties {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.nosql.couchbase.repositories;
import org.springframework.core.convert.converter.Converter;
class MyConverter implements Converter<CouchbaseProperties, Boolean> {
@Override
public Boolean convert(CouchbaseProperties value) {
return true;
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.nosql.elasticsearch.connectingusingspringdata;
class User {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.nosql.ldap.repositories;
class User {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.quartz;
import java.util.Date;
class MyService {
void someMethod(Date date, String name) {
}
}
......@@ -16,8 +16,6 @@
package org.springframework.boot.docs.features.quartz;
import java.util.Date;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
......@@ -48,11 +46,3 @@ public class SampleJob extends QuartzJobBean {
}
}
// @chomp:file
class MyService {
void someMethod(Date date, String name) {
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.resttemplate;
class Details {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.rsocket.requester;
class User {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.springapplication.applicationavailability.managing;
class CacheCompletelyBrokenException extends RuntimeException {
}
......@@ -40,8 +40,3 @@ public class LocalCacheVerifier {
}
}
// @chomp:file
class CacheCompletelyBrokenException extends RuntimeException {
}
......@@ -23,12 +23,10 @@ import org.springframework.boot.context.metrics.buffering.BufferingApplicationSt
@SpringBootApplication
public class MyApplication {
// tag::code[]
public static void main(String[] args) {
SpringApplication application = new SpringApplication(MyApplication.class);
application.setApplicationStartup(new BufferingApplicationStartup(2048));
application.run(args);
}
// end::code[]
}
......@@ -23,13 +23,11 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class CustomizeR2dbcPortConfiguration {
public class MyR2dbcPortConfiguration {
// tag::code[]
@Bean
public ConnectionFactoryOptionsBuilderCustomizer connectionFactoryPortCustomizer() {
return (builder) -> builder.option(ConnectionFactoryOptions.PORT, 5432);
}
// end::code[]
}
......@@ -44,12 +44,3 @@ class MyRestClientTests {
}
}
// @chomp:file
class RemoteVehicleDetailsService {
String callRestService() {
return "hello";
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredrestclient;
class RemoteVehicleDetailsService {
String callRestService() {
return "hello";
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdatacassandra;
interface SomeRepository {
}
......@@ -42,25 +42,3 @@ class MyRepositoryTests {
}
}
// @chomp:file
class User {
User(String username, String employeeNumber) {
}
String getEmployeeNumber() {
return null;
}
String getUsername() {
return null;
}
}
interface UserRepository {
User findByUsername(String username);
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdatajpa.withoutdb;
class User {
User(String username, String employeeNumber) {
}
String getEmployeeNumber() {
return null;
}
String getUsername() {
return null;
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdatajpa.withoutdb;
interface UserRepository {
User findByUsername(String username);
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdataneo4j.propagation;
interface SomeRepository {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringdataredis;
interface SomeRepository {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.springbootapplications.autoconfiguredspringrestdocs.withmockmvc;
class UserController {
}
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2021 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.
......@@ -45,8 +45,3 @@ class UserDocumentationTests {
}
}
// @chomp:file
class UserController {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.springbootapplications.excludingconfiguration;
class MyTestsConfiguration {
}
......@@ -48,25 +48,3 @@ class MyJsonTests {
}
}
// @chomp:file
class VehicleDetails {
private final String make;
private final String model;
VehicleDetails(String make, String model) {
this.make = make;
this.model = model;
}
String getMake() {
return this.make;
}
String getModel() {
return this.model;
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.springbootapplications.jsontests;
class SomeObject {
SomeObject(float value) {
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.springbootapplications.jsontests;
class VehicleDetails {
private final String make;
private final String model;
VehicleDetails(String make, String model) {
this.make = make;
this.model = model;
}
String getMake() {
return this.make;
}
String getModel() {
return this.model;
}
}
......@@ -42,20 +42,3 @@ class MyTests {
}
}
// @chomp:file
class RemoteService {
Object getValue() {
return null;
}
}
class Reverser {
String getReverseValue() {
return null;
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.springbootapplications.mockingbeans.bean;
class RemoteService {
Object getValue() {
return null;
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.springbootapplications.mockingbeans.bean;
class Reverser {
String getReverseValue() {
return null;
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.springbootapplications.mockingbeans.listener;
class MyConfig {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.testing.utilities.configdataapplicationcontextinitializer;
class Config {
}
......@@ -25,13 +25,11 @@ import static org.assertj.core.api.Assertions.assertThat;
class MyEnvironmentTests {
// start::code[]
@Test
void testPropertySources() {
MockEnvironment environment = new MockEnvironment();
TestPropertyValues.of("org=Spring", "name=Boot").applyTo(environment);
assertThat(environment.getProperty("name")).isEqualTo("Boot");
}
// end::code[]
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.validation;
class Archive {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.validation;
class Author {
}
......@@ -30,12 +30,3 @@ public class MyBean {
}
}
// @chomp:file
class Archive {
}
class Author {
}
......@@ -36,12 +36,3 @@ public class MyService {
}
}
// @chomp:file
class SomeRequest {
}
class SomeResponse {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.webservices.template;
class SomeRequest {
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.features.webservices.template;
class SomeResponse {
}
......@@ -16,7 +16,6 @@
package org.springframework.boot.docs.howto.actuator.maphealthindicatorstometrics;
// tag::code[]
import io.micrometer.core.instrument.Gauge;
import io.micrometer.core.instrument.MeterRegistry;
......@@ -51,4 +50,3 @@ public class MetricsHealthMicrometerExport {
}
}
// end::code[]
......@@ -16,7 +16,6 @@
package org.springframework.boot.docs.howto.application.customizetheenvironmentorapplicationcontext;
// tag::code[]
import java.io.IOException;
import org.springframework.boot.SpringApplication;
......@@ -50,4 +49,3 @@ public class MyEnvironmentPostProcessor implements EnvironmentPostProcessor {
}
}
// end::code[]
......@@ -16,7 +16,6 @@
package org.springframework.boot.docs.howto.dataaccess;
// tag::code[]
import io.r2dbc.spi.ConnectionFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -38,4 +37,3 @@ public class R2dbcDatabaseInitializationConfiguration {
}
}
// end::code[]
......@@ -16,7 +16,6 @@
package org.springframework.boot.docs.howto.dataaccess.configureacomponentthatisusedbyjpa;
// tag::code[]
import javax.persistence.EntityManagerFactory;
import org.springframework.boot.autoconfigure.orm.jpa.EntityManagerFactoryDependsOnPostProcessor;
......@@ -35,4 +34,3 @@ public class ElasticsearchEntityManagerFactoryDependsOnPostProcessor
}
}
// end::code[]
......@@ -16,7 +16,6 @@
package org.springframework.boot.docs.howto.dataaccess.configurecustomdatasource;
// tag::code[]
import javax.sql.DataSource;
import org.springframework.boot.context.properties.ConfigurationProperties;
......@@ -34,4 +33,3 @@ public class BasicDataSourceConfiguration {
}
}
// end::code[]
......@@ -16,7 +16,6 @@
package org.springframework.boot.docs.howto.dataaccess.configurecustomdatasource;
// tag::code[]
import com.zaxxer.hikari.HikariDataSource;
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
......@@ -42,4 +41,3 @@ public class ConfigurableDataSourceConfiguration {
}
}
// end::code[]
......@@ -16,7 +16,6 @@
package org.springframework.boot.docs.howto.dataaccess.configurecustomdatasource;
// tag::code[]
import com.zaxxer.hikari.HikariDataSource;
import org.springframework.boot.context.properties.ConfigurationProperties;
......@@ -34,4 +33,3 @@ public class SimpleDataSourceConfiguration {
}
}
// end::code[]
......@@ -16,7 +16,6 @@
package org.springframework.boot.docs.howto.dataaccess.configurehibernatenamingstrategy;
// tag::code[]
import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment;
import org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy;
......@@ -39,4 +38,3 @@ class CaseSensitiveSpringPhysicalNamingStrategyConfiguration {
}
}
// end::code[]
......@@ -16,7 +16,6 @@
package org.springframework.boot.docs.howto.dataaccess.configurehibernatesecondlevelcaching;
// tag::code[]
import org.hibernate.cache.jcache.ConfigSettings;
import org.springframework.boot.autoconfigure.orm.jpa.HibernatePropertiesCustomizer;
......@@ -33,4 +32,3 @@ public class HibernateSecondLevelCacheConfiguration {
}
}
// end::code[]
......@@ -16,7 +16,6 @@
package org.springframework.boot.docs.howto.dataaccess.configuretwodatasources;
// tag::code[]
import com.zaxxer.hikari.HikariDataSource;
import org.apache.commons.dbcp2.BasicDataSource;
......@@ -56,4 +55,3 @@ public class CompleteDataSourcesConfiguration {
}
}
// end::code[]
......@@ -16,7 +16,6 @@
package org.springframework.boot.docs.howto.dataaccess.configuretwodatasources;
// tag::code[]
import com.zaxxer.hikari.HikariDataSource;
import org.apache.commons.dbcp2.BasicDataSource;
......@@ -51,4 +50,3 @@ public class SimpleDataSourcesConfiguration {
}
}
// end::code[]
......@@ -22,18 +22,14 @@ import org.springframework.boot.autoconfigure.orm.jpa.JpaProperties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.orm.jpa.JpaVendorAdapter;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
/**
* Example configuration for a custom JPA entity manager.
*
* @author Stephane Nicoll
*/
public class CustomEntityManagerFactoryExample {
@Configuration(proxyBeanMethods = false)
public class CustomEntityManagerFactoryConfiguration {
// tag::configuration[]
@Bean
@ConfigurationProperties("app.jpa.first")
public JpaProperties firstJpaProperties() {
......@@ -56,10 +52,5 @@ public class CustomEntityManagerFactoryExample {
// Map JPA properties as needed
return new HibernateJpaVendorAdapter();
}
// end::configuration[]
private static class Order {
}
}
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.howto.dataaccess.usemultipleentitymanagers;
class Order {
}
......@@ -16,7 +16,6 @@
package org.springframework.boot.docs.howto.httpclients.webclientreactornettycustomization;
// tag::code[]
import io.netty.channel.ChannelOption;
import io.netty.handler.timeout.ReadTimeoutHandler;
import reactor.netty.http.client.HttpClient;
......@@ -28,7 +27,7 @@ import org.springframework.http.client.reactive.ReactorClientHttpConnector;
import org.springframework.http.client.reactive.ReactorResourceFactory;
@Configuration(proxyBeanMethods = false)
public class CustomizeReactorNettyClientConfiguration {
public class MyReactorNettyClientConfiguration {
@Bean
ClientHttpConnector clientHttpConnector(ReactorResourceFactory resourceFactory) {
......@@ -39,4 +38,3 @@ public class CustomizeReactorNettyClientConfiguration {
}
}
// end::code[]
/*
* Copyright 2012-2021 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.docs.howto.jersey.springsecurity;
class Endpoint {
}
......@@ -16,7 +16,6 @@
package org.springframework.boot.docs.howto.jersey.springsecurity;
// tag::code[]
import java.util.Collections;
import org.glassfish.jersey.server.ResourceConfig;
......@@ -32,8 +31,3 @@ public class JerseySetStatusOverSendErrorConfig extends ResourceConfig {
}
}
// end::code[]
class Endpoint {
}
......@@ -16,7 +16,6 @@
package org.springframework.boot.docs.howto.webserver.enablemultipleconnectorsintomcat;
// tag::code[]
import java.io.IOException;
import java.net.URL;
......@@ -60,4 +59,3 @@ public class TomcatMultipleConnectorsConfiguration {
}
}
// end::code[]
......@@ -18,7 +18,6 @@ package org.springframework.boot.docs.howto.webserver.enablemultiplelistenersinu
import io.undertow.Undertow.Builder;
//tag::code[]
import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.context.annotation.Bean;
......@@ -37,4 +36,3 @@ public class UndertowMultipleListenersConfiguration {
}
}
// end::code[]
......@@ -16,7 +16,6 @@
package org.springframework.boot.docs.howto.webserver.usetomcatlegacycookieprocessor;
// tag::code[]
import org.apache.tomcat.util.http.LegacyCookieProcessor;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
......@@ -34,4 +33,3 @@ public class LegacyCookieProcessorConfiguration {
}
}
// end::code[]
......@@ -17,7 +17,8 @@
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]" checks="NonEmptyAtclauseDescription" />
<suppress files="[\\/]autoconfigure[\\/].*Properties\.java" checks="JavadocType" />
<suppress files="[\\/]autoconfigure[\\/].*Properties\.java" checks="JavadocVariable" />
<suppress files="[\\/]spring-boot-docs[\\/]" checks="JavadocType|OneTopLevelClass" />
<suppress files="[\\/]spring-boot-docs[\\/]" checks="JavadocType" />
<suppress files="[\\/]spring-boot-docs[\\/]" checks="SpringJavadoc" message="\@since" />
<suppress files="[\\/]spring-boot-smoke-tests[\\/]" checks="JavadocType" />
<suppress files="[\\/]spring-boot-smoke-tests[\\/]" checks="ImportControl" />
<suppress files="[\\/]spring-boot-smoke-tests[\\/]" id="mainCodeIllegalImportCheck" />
......@@ -42,7 +43,6 @@
<suppress files="[\\/]src[\\/]test[\\/]java[\\/]org[\\/]springframework[\\/]boot[\\/]test[\\/]rule[\\/]" checks="SpringJUnit5" />
<suppress files="OutputCaptureRuleTests" checks="SpringJUnit5" />
<suppress files="SampleJUnitVintageApplicationTests" checks="SpringJUnit5" />
<suppress files="[\\/]spring-boot-docs[\\/]" checks="SpringJavadoc" message="\@since" />
<suppress files="[\\/]spring-boot-smoke-tests[\\/]" checks="SpringJavadoc" message="\@since" />
<suppress files="[\\/]spring-boot-smoke-tests[\\/]spring-boot-smoke-test-testng[\\/]" checks="SpringJUnit5" />
<suppress files="[\\/]src[\\/]intTest[\\/]java[\\/]" checks="SpringJavadoc" message="\@since" />
......
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