spring-cloud

How spring cloud defines validation interval under the Pivotal Cloud Foundry?

柔情痞子 提交于 2019-12-13 03:04:52
问题 I'm working on application that get the DS from PCF (Pivotal Cloud FoundrY) User provided services. It's working properly but I want to understand how the validation interval is defined. As Spring and PCF are managing my connection pool. I'd like to understand how that works. public DataSource getProfileDS() { PoolConfig poolConfig = new PoolConfig(5, 10, 30000); DataSourceConfig dsConfig = new DataSourceConfig(poolConfig, null); return connectionFactory().dataSource("profileDS", dsConfig); }

Spring Cloud Netflix: Whats happening in ZuulConfiguration with the ZuulServlet?

旧时模样 提交于 2019-12-13 02:09:44
问题 Looking in ZuulConfiguration, I see the following: @Bean public ZuulController zuulController() { return new ZuulController(); } @Bean public ServletRegistrationBean zuulServlet() { return new ServletRegistrationBean(new ZuulServlet(), this.zuulProperties.getServletPattern()); } ZuulController wraps the ZuulServlet and manages its lifecycle as if it were a Spring Controller. What throws me is that the ZuulConfiguration class registers the servlet anyways using a ServletRegistrationBean.

Spring Cloud Config not decrypting the config server password

丶灬走出姿态 提交于 2019-12-13 00:47:53
问题 I am working on Spring Cloud Config for a while. I have a requirement for securing the config data. As per Spring Cloud Documentation have configured the server.jks and added to classpath. Now i am able to encrypt and decrypt remote config data. For making the config server secure i have added spring security starter and assigned credentials (password decryted). For some reason the application is throwing excpetions that it does not have key store on the classpath. After googling it for a

Array Multipart[] file upload using Feign client

六月ゝ 毕业季﹏ 提交于 2019-12-12 21:08:03
问题 I am trying to upload Array of Multipart file object using feign client. This is the service am trying to call using Feign client. public ResponseEntity<Object> manageFileUpload(@RequestParam("files") MultipartFile[] files) I tried using,Feign client Annotation, @FeignClient(value = "UPLOADUTILITIES", configuration = Upload.MultipartSupportConfig.class, fallback = UploadFallback.class) My Method, @RequestMapping(name = "upload", value = "/object", method = RequestMethod.POST) @Headers(

Spring Cloud Netflix and Docker Compose - cannot register services with eureka

送分小仙女□ 提交于 2019-12-12 14:49:51
问题 I'm trying to use docker-compose to run 2 simple services locally (Ubuntu): a eureka server, and config server (which is also a eureka client). Both of these have simple dockerfiles that run java -jar , expose their ports, and individually work fine. I also tried to add eureka.client.service-url.defaultZone=http://company-service-discovery:8761/eureka to see if it would register itself, and it worked. My config server cannot successfully register to the eureka server, and I've googled it and

Spring Cloud Feign Client duplicate list values

橙三吉。 提交于 2019-12-12 14:05:59
问题 I have this interface mapping my rest client using Spring cloud Feign. @FeignClient(url = "http://localhost:8080") public interface RestClient { @RequestMapping(value = "?ids={ids}", method = GET) List<Posicao> get(@RequestParam(value = "ids") List ids); } I have a list in my parameters, calling the client I have this request: restClient.get(Arrays.asList(1, 2)); http://localhost:8080/ids=1,2,1,2 It's duplicating the list values! I already tried using an array, an integer and string generic

How to configure the bindings of a function in Spring Cloud Stream to bind its input to a web endpoint and its output to a Kafka topic

烂漫一生 提交于 2019-12-12 11:35:02
问题 I have a regular java Function ; which I am trying to bind: Its input to a web endpoint Its output to a kafka topic. When I use my function in the context of the web, it always returns the resulting value of the Function back to the web client alone. Can I do something like this?: spring.cloud.stream.bindings.input.binder=web spring.cloud.stream.bindings.output.binder=kafka I'm currently even trying to split the Function into 2: One with its input bound to the web client and its output

how to manage spring-cloud bootstrap properties in a shared library?

限于喜欢 提交于 2019-12-12 11:10:18
问题 I'm in the process of building a library which provides an opinionated configuration for applications which use our Spring Cloud Config/Eureka setup. The idea is to deliver this configuration as a custom starter with little or no spring cloud-related boilerplate in individual microservice apps. At this point, the majority of the shared configuration that I want to put in this library consists of stuff in bootstrap.yml . I'd like to provide bootstrap.yml in my custom starter, but applications

Can not connect between containers within one pod in kubernetes

半腔热情 提交于 2019-12-12 10:19:31
问题 Here's my bootstrap.yml of my client spring: cloud: config: enabled: true uri: http://localhost:8888 label: master spring.application: name: microservices-client spring.profiles: active: dev Here's my spring config server bootstrap.yml spring: application: name: microservices-client profiles: active: dev cloud: config: uri: http://localhost:8888 And here's my spring config application.yml server: port: 8888 spring: cloud: config: server: git: uri: ssh://git@riscm.company.com/sem/some_repo.git

XACML for Spring Cloud

被刻印的时光 ゝ 提交于 2019-12-12 09:03:20
问题 I'm going to secure my Spring Cloud Application with OAuth2 and XACML (using AuthZForce, Balana, AT&T XACML or something similar). I want to use the microservices from Spring-Cloud(-Netflix). To make XACML available I think that I need this: PEP for each existing API-service PDP's as new services, that are used by PEP's. Because Spring-Cloud(-Netflix) has load-balancing functions (Eureka) I need to register this services on Eureka and implement a REST-API. Because all PDP's should use the