I'd like Spring Boot to provide integration with MockWebServer. For my particular case, I'd like to be able to leverage MockWebServer.url to configure environment variables for testing. For example, a user of Spring Boot's Security OAuth2 support might want to provide a value for spring.security.oauth2.resourceserver.jwt.issuer-uri that points to the MockWebServer.
One way a user might be able to integrate this is by providing a property that looks like:
I'd like Spring Boot to provide integration with
MockWebServer
. For my particular case, I'd like to be able to leverageMockWebServer.url
to configure environment variables for testing. For example, a user of Spring Boot's Security OAuth2 support might want to provide a value forspring.security.oauth2.resourceserver.jwt.issuer-uri
that points to theMockWebServer
.One way a user might be able to integrate this is by providing a property that looks like:
Spring Boot could provide a hook that would change
${mockwebserver.url}
into a URL created usingMockWebServer.url
.A few points of consideration:
MockWebServer
will need to be accessible to the user to add mock responsesMockWebServer
between tests.MockWebServer