Search in sources :

Example 1 with UriConfigurer

use of org.springframework.restdocs.mockmvc.UriConfigurer in project spring-boot by spring-projects.

the class RestDocsMockMvcBuilderCustomizer method afterPropertiesSet.

@Override
public void afterPropertiesSet() throws Exception {
    PropertyMapper map = PropertyMapper.get();
    RestDocsProperties properties = this.properties;
    UriConfigurer uri = this.delegate.uris();
    map.from(properties::getUriScheme).whenHasText().to(uri::withScheme);
    map.from(properties::getUriHost).whenHasText().to(uri::withHost);
    map.from(properties::getUriPort).whenNonNull().to(uri::withPort);
}
Also used : UriConfigurer(org.springframework.restdocs.mockmvc.UriConfigurer) PropertyMapper(org.springframework.boot.context.properties.PropertyMapper)

Aggregations

PropertyMapper (org.springframework.boot.context.properties.PropertyMapper)1 UriConfigurer (org.springframework.restdocs.mockmvc.UriConfigurer)1