spring-cloud

Spring Cloud - SQS

妖精的绣舞 提交于 2020-01-03 08:41:20
问题 I'm trying to get a simple queue handler working with the Spring Cloud framework. I've successfully got the message handler polling the queue, However. The problem I'm seeing is that when I post a message to the queue, my handler is failing to unmarshall the payload in to the required java Object. @MessageMapping("MyMessageQueue") @SuppressWarnings("UnusedDeclaration") public void handleCreateListingMessage(@Headers Map<String, String> headers, MyMessage message) { //do something with the

Spring Cloud Netflix Zuul large file upload

谁说我不能喝 提交于 2020-01-03 06:44:05
问题 I'm using Spring Boot for a project and i'm trying to upload large files but somehow it doesnt work. I have Spring Boot + Zuul (@EnableZuulProxy) running on port 8080 and then another microservice (Lets call it datastore) that should handle the upload. I post a multipart request to http://localhost:8080/zuul/my/upload/endpoint which contains a file and a text string. When I upload a file of 100MB everything works fine. Zuul passes the request to the datastore and the request comes in and is

dynamically generate list of beans from .yaml file in confg-server

自闭症网瘾萝莉.ら 提交于 2020-01-03 05:07:29
问题 I'm using spring-config-server. I have it working, but Ideally, I'd like to generate a list of servers in a .yaml file that have properties. @Resource private List<Server> servers; then: @Component public class Server { @Value("${server.name}") private String name; } in the (applicationName).yaml file: servers: - name: test - name: test2 See I want a List<Server> generated dynamically from a config. The fact that this config is on a config server shouldn't be that different from a local .yaml

Custom Spring config EnvironmentRepository not being picked up

烂漫一生 提交于 2020-01-03 05:03:34
问题 I'm trying to figure out why my custom Environment Repository (in an embedded mode Spring Config application i.e. no stand-along Config server) isn't being picked up. The object is obviously being constructed (I hit a log print statement at this point) but none of the properties I inject into it (from a hashmap for this example) show up in an env actuator dump i.e. custom.prop.* . The findOne(...) isn't being invoked. Dump at https://gist.github.com/balamuru/1047db7080a4da6f067dd7cfac86a2c2

How to configure a github repository as a config repo for spring cloud server?

百般思念 提交于 2020-01-03 04:21:04
问题 I have created a github repository https://github.com/Nisarg04/microservices-config-repo.git , which I want to be treated as a config repo. Also, I have a spring cloud server, which picks properties from local repo (as per current configuration). I want that to be picked from github repo. application.properties looks something like this : spring.application.name=spring-cloud-config-server server.port=8888 #spring.cloud.config.server.git.uri=file:///C:/Users/admin/git/git-localconfig-repo

spring-boot Autowired DiscoveryClient RestTemplate UnknownHostException

流过昼夜 提交于 2020-01-02 06:52:10
问题 I'm using spring boot 1.3.3 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.3.3.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> Edit I'm using Brixton.RC1 for my spring cloud dependencies <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>Brixton.RC1</version> <type>pom</type> <scope

How to use Spring Cloud Config with a Git and Vault composite environment repository?

妖精的绣舞 提交于 2020-01-02 05:46:11
问题 I've been tinkering with Spring Cloud Config, but have a use case where config properties are divided into two types: Non-secret values, which developers should be able to view and maintain (e.g. JDBC URL's, etc) Secret values, which should be viewed and maintained only by designated people with special access (e.g. passwords) So I'm very interested in the support for "Composite Environment Repositories", currently available in the snapshot versions. It seems like I would be able to use Git

Spring cloud Zuul retry when instance is down and forward to other available instance

你。 提交于 2020-01-02 04:01:32
问题 using 'Camden.SR5' for spring-cloud-dependencies, with spring boot '1.5.2.RELEASE'. In my current setup, I have eureka server config server (running on random ports) zuul gateway server and 2 instances of a service (running on random ports) All these instances are successfully register with Eureka. When all the services are running, The load balancing is done properly through zuul without any issues. when an instance is killed, Zuul is still trying to fulfil the request using the same service

java.lang.IllegalStateException: No instances available for student-service at org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient

被刻印的时光 ゝ 提交于 2020-01-01 19:39:10
问题 I am running the Spring Cloud Consule example from link:: https://howtodoinjava.com/spring/spring-cloud/consul-service-registration-discovery/ . When I am running the http://localhost:8098/getSchoolDetails/abcschool I am getting the below error, it seems that client is unable to recognized the student-service . java.lang.IllegalStateException: No instances available for student-service at org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.execute(RibbonLoadBalancerClient.java

Unable to get /hystrix.stream in Spring Cloud

二次信任 提交于 2020-01-01 10:48:29
问题 I have created a microservice with following dependencies of Spring cloud version Camden.SR2 . Spring Boot 1.4.1. http://localhost:8080/hystrix.stream is not responding. If I make the Spring Cloud version as Brixton.* (RELEASE, SR1,...), I get only ping: as reply in browser. <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring