Skip to content

Polish #11143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Polish #11143

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void noRepositoryAvailable() throws Exception {

@Test
public void doesNotTriggerDefaultRepositoryDetectionIfCustomized() {
load(CouchbaseReactiveRepositoriesAutoConfigurationTests.CustomizedConfiguration.class);
load(CustomizedConfiguration.class);
assertThat(this.context.getBeansOfType(ReactiveCityCouchbaseRepository.class))
.isEmpty();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4568,12 +4568,12 @@ This sample configuration reuses the `Cluster` that was created via auto-configu
If Redis is available and configured, a `RedisCacheManager` is auto-configured. It is
possible to create additional caches on startup by setting the
`spring.cache.cache-names` property and cache defaults can be configured using
`spring.redis.cache.*` properties. For instance, the following configuration creates
`spring.cache.redis.*` properties. For instance, the following configuration creates
`cache1` and `cache2` caches with a _time to live_ of 10 minutes:

[source,properties,indent=0]
----
spring.cache.cache-names=cache1,cache2
spring.cache.cache-names=cache1,cache2
spring.cache.redis.time-to-live=600000
----

Expand Down Expand Up @@ -4603,7 +4603,7 @@ maximum size of 500 and a _time to live_ of 10 minutes

[source,properties,indent=0]
----
spring.cache.cache-names=cache1,cache2
spring.cache.cache-names=cache1,cache2
spring.cache.caffeine.spec=maximumSize=500,expireAfterAccess=600s
----

Expand All @@ -4625,7 +4625,7 @@ as follows:

[source,properties,indent=0]
----
spring.cache.cache-names=cache1,cache2
spring.cache.cache-names=cache1,cache2
----

If you do so and your application uses a cache not listed, then it fails at runtime when
Expand Down Expand Up @@ -6017,7 +6017,7 @@ A list of the auto-configuration that is enabled by `@JsonTest` can be
==== Auto-configured Spring MVC Tests
To test Spring MVC controllers are working as expected, you can use the `@WebMvcTest`
annotation. `@WebMvcTest` auto-configures the Spring MVC infrastructure and limits
scanned beans to `@Controller`, `@ControllerAdvice`, `@JsonComponent`, `@Converter`,
scanned beans to `@Controller`, `@ControllerAdvice`, `@JsonComponent`, `Converter`, `GenericConverter`,
`Filter`, `WebMvcConfigurer`, and `HandlerMethodArgumentResolver`. Regular `@Component`
beans are not scanned when using this annotation.

Expand Down Expand Up @@ -6124,7 +6124,7 @@ A list of the auto-configuration settings that are enabled by `@WebMvcTest` can
To test that Spring WebFlux controllers are working as expected, you can use the
`@WebFluxTest` annotation. `@WebFluxTest` auto-configures the Spring WebFlux
infrastructure and limits scanned beans to `@Controller`, `@ControllerAdvice`,
`@JsonComponent`, `Converter`, and `WebFluxConfigurer`. Regular `@Component` beans are
`@JsonComponent`, `Converter`, `GenericConverter`, and `WebFluxConfigurer`. Regular `@Component` beans are
not scanned when the `@WebFluxTest` annotation is used.

TIP: If you need to register extra components such as Jackson `Module`, you can import
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>spring-boot-starters</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starters</artifactId>
<version>${revision}</version>
</parent>
<artifactId>spring-boot-starter-data-couchbase-reactive</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* <p>
* Using this annotation will disable full auto-configuration and instead apply only
* configuration relevant to WebFlux tests (i.e. {@code @Controller},
* {@code @ControllerAdvice}, {@code @JsonComponent}, {@code Converter}, and
* {@code @ControllerAdvice}, {@code @JsonComponent}, {@code Converter}/{@code GenericConverter}, and
* {@code WebFluxConfigurer} beans but not {@code @Component}, {@code @Service} or
* {@code @Repository} beans).
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* <p>
* Using this annotation will disable full auto-configuration and instead apply only
* configuration relevant to MVC tests (i.e. {@code @Controller},
* {@code @ControllerAdvice}, {@code @JsonComponent}, {@code Converter}, {@code Filter},
* {@code @ControllerAdvice}, {@code @JsonComponent}, {@code Converter}/{@code GenericConverter}, {@code Filter},
* {@code WebMvcConfigurer} and {@code HandlerMethodArgumentResolver} beans but not
* {@code @Component}, {@code @Service} or {@code @Repository} beans).
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public Mono<String> two() {
}

@GetMapping("/two/{id}")
public Mono<String> one(@PathVariable ExampleId id) {
public Mono<String> two(@PathVariable ExampleId id) {
return Mono.just(id.getId() + "two");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@

import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest;
import org.springframework.core.convert.TypeDescriptor;
import org.springframework.core.convert.converter.Converter;
import org.springframework.core.convert.converter.GenericConverter;
import org.springframework.lang.Nullable;
import org.springframework.stereotype.Component;

/**
* Example {@link Converter} used with {@link WebFluxTest} tests.
* Example {@link GenericConverter} used with {@link WebFluxTest} tests.
*
* @author Stephane Nicoll
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ public class ExampleController2 {

@GetMapping("/two")
@ResponseBody
public String one(ExampleArgument argument) {
public String two(ExampleArgument argument) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😓

return argument + "two";
}

@GetMapping("/two/{id}")
@ResponseBody
public String one(@PathVariable ExampleId id) {
public String two(@PathVariable ExampleId id) {
return id.getId() + "two";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

import java.util.UUID;

import org.springframework.core.convert.converter.Converter;
import org.springframework.core.convert.converter.GenericConverter;

/**
* An example attribute that requires a {@link Converter}.
* An example attribute that requires a {@link GenericConverter}.
*
* @author Stephane Nicoll
*/
Expand Down