This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| responseBody = CharStreams.toString(ctx.responseDataStream.reader()) | |
| ctx.responseBody = responseBody |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Component | |
| class PassthruPreFilter : ZuulFilter() { | |
| override fun shouldFilter() = true | |
| override fun filterType() = "pre" | |
| override fun filterOrder() = 1 | |
| override fun run(): Any { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PassthruContext { | |
| lateinit var requestContext: PassthruRequestContext | |
| lateinit var responseContext: PassThruResponseContext | |
| } | |
| data class PassthruRequestContext(val httpMethod: String, val url:String, val headers:Map<String,String>, val body: String) | |
| data class PassThruResponseContext(val statusCode: Int, val headers: Map<String, String>, val body: String) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3' | |
| services: | |
| lb: | |
| build: | |
| context: ./nginx | |
| dockerfile: Dockerfile | |
| ports: | |
| - "9090:9090" | |
| depends_on: | |
| - service1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| service1: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile | |
| depends_on: | |
| - rabbit | |
| service2: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| management.endpoints.web.exposure.include = beans, health, info, bus-env, trace | |
| management.endpoint.health.show-details= always | |
| spring.cloud.bus.trace.enabled=true | |
| spring.cloud.bus.destination = someBus | |
| spring.rabbitmq.host= rabbit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @RestController | |
| @RequestMapping("/api") | |
| class DummyController { | |
| @Autowired | |
| lateinit var applicationContext: ApplicationContext | |
| @Autowired | |
| lateinit var busProperties: BusProperties |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Component | |
| class State { | |
| var data = 10 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lb: | |
| build: | |
| context: ./nginx | |
| dockerfile: Dockerfile | |
| ports: | |
| - "9090:9090" | |
| depends_on: | |
| - service1 | |
| - service2 | |
| - service3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rabbit: | |
| image: rabbitmq:3-management | |
| ports: | |
| - 5672:5672 | |
| - 15672:15672 |