Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
MAHAK
@MahakBag_twitter
hi i'm trying to run a spring boot application jar from command prompt using command java -java -Dspring.config.location=/application.properties jar-name.jar
sorry command is java -jar Dspring.config.location=/application.properties location/jar-name.jar
what can be the issue with the jar, why its not taking values from the file provided externally
JonathanAaron
@JonathanAaron
I've been having some issues with OpenFeign due to using the wrong annotations. Specifically @Headers versus @RequestHeader Is there some openfeign to spring annotation guide, if not where can I create it so it'll show up in the spring cloud docs?
JonathanAaron
@JonathanAaron
I've come up with another issue when using feign. How to set the content type for ones that aren't application/json? Is there a
link to documentation?
Rajeev Kumar kallempudi
@rajeevprasanna
Hi,
i am trying to dockerize the spring cloud function to run on AWS lambda. I am not able to find any documentation which helps to do that.
can someone point me to helpful resources.
avnerstr
@avnerstr

I'm trying to understand what is the best solution and pros and cons for central configuration

  1. Spring cloud config
  2. Spring Cloud Kubernetes ConfigWatcher

If we are running on k8s what is the best solution between the two?

Angshuman Agarwal
@angshuman-agarwal
Hi,
Is there a sample to use "embedded-redis" (localised) with spring cloud gateway rate limiter please ?
Kanai
@kanai0618
Hello All, Could you help me with this ? How to pass variable from filter to forward controller in Spring Cloud Gateway
1 reply
Ingo Griebsch
@ingogriebsch

Hello together!

I am currently developing a Spring Boot application that uses Spring Cloud Stream together with RabbitMQ. I am using Spring Boot version 2.5.3 and Spring Cloud version 2020.0.3.

When I include the dependencies which also provides start.spring.io, I get a NoSuchMethod error during the start of the service. However, if I manage the org.springframework.integration:spring-integration-amqp dependency manually, the service starts without problems.

Now I wonder if I am missing something or if this is really a general problem. And if so, for which of the involved projects I should create an issue.

Perhaps @spencergibb can say something about this? :)

Ingo Griebsch
@ingogriebsch
Me again! It looks like the issue is already known! The corresponding tickets are spring-cloud/spring-cloud-stream-binder-rabbit#328 and spring-projects/spring-integration#3601 (in case someone stumbles about this messages or has the same problem). :)
karanbir8080
@karanbir8080

Hi , read about issue where a large number of tcp connections are made from clients to gateway. spring-cloud/spring-cloud-gateway#1985 . This was fixed in reactor netty.

However i had a doubt about usage of property 'spring.cloud.gateway.httpclient.pool.max-idle-time' . Does this property achieve the same functionality of removing idle connections.

Cesar Manuel Cruzata De la Cruz
@cruzatadelacruzc
Hello, I need to know the version spring-cloud-gateway was to add support to Token Refresh
learningdeveloper2021
@learningdeveloper2021

Registering error with row details + line number + error message

I'm processing a csv file using spring batch. I want to registering error with row details + line number + error message on all the steps wherever the error has been occured. The error may occur in reading stage or file input stage or processing stage or writing stage.

How to do this? Best practice to do this?

Thanks

Henrique Luis Schmidt
@henriquels25
Hi, I created the following StackOverflow question: https://stackoverflow.com/questions/68787306/spring-cloud-openfeign-how-can-i-create-a-test-slice I would appreciate if someone could take a look at it
Yish
@FunnyYish
Hi,is there any plan to support Service Mesh in Spring Cloud ?
For example, use Consul Mesh
Mongolian1
@Mongolian1

Hello, everybody! I am currently refactoring my spring cloud application using spring cloud kubernetes together with kubernetes.
I am trying to externalize the properties in application.yml file with configMap and secret with embeded application.yaml file. I wonder if there is a way for Splitting one application.yml file into embeded application.yaml file in configMap and embeded application.yaml file in secret. something like:
application.yml

spring:
      profiles: development
    greeting:
      message: Say Hello to the Developers
    datasource:
     url: xxxd
     username: xxxd
     password: xxxd
     driver-class-name: xxxd
    ---
    spring:
      profiles: production
    greeting:
      message: Say Hello to the Ops
 datasource:
     url: xxxp
     username: xxxp
     password: xxxp
     driver-class-name: xxxp

ConfigMap:

kind: ConfigMap
apiVersion: v1
metadata:
  name: myconfig
data:
  application.yml: |-
    spring:
      profiles: development
    greeting:
      message: Say Hello to the Developers
    ---
    spring:
      profiles: production
    greeting:
      message: Say Hello to the Ops

Secret:

apiVersion: v1
kind: Secret
metadata:
  name: mysecret
type: Opaque
stringData:
  application.yml: |-
    spring:
      profiles: development
    datasource:
     url: xxxd
     username: xxxd
     password: xxxd
     driver-class-name: xxxd
    ---
    spring:
      profiles: production
    datasource:
     url: xxxp
     username: xxxp
     password: xxxp
     driver-class-name: xxxp

spring cloud kubernetes config:

spring:
  application:
    name: cloud-k8s-app
  cloud:
    kubernetes:
      secrets:
        namespace: default-namespace
        sources:
         - name: mysecret
     config:
        namespace: default-namespace
        sources:
         - name: myconfig

can spring cloud kubernetes automatically combine two parts of applicaton.yml (in configmap and secret respectively)?

r-asou
@r-asou
Does anyone know how to use ServerWebExchange to get Request Body content, when use spring cloud gateway to handle Post Request
Ingo Griebsch
@ingogriebsch
Hello, I'm searching for the javadoc of the current Spring-Cloud-Stream release. Unfortunately, the links on the project website are broken. Therefore I would like to ask if they are available somewhere else? :)
gooddev2021
@gooddev2021

Can someone help me with a good link to do the following using Spring Integration Outbound Adapter?

#1 - Write an API, when user hits the API where csv is input for the API - process via spring

 integration and send it FTP server (OR)

#2 - Write an API, when user hits the API - fetch the new daily records from DB - write it to

 a csv file and send it to the FTP server via Spring Integration Outbound Adapter

Thanks

Kranthi
@Krannthi
Hi, Could we override logging.config property loaded from spring config server when we provide it as a system property. Does system property have precedence over spring config server properties
gooddev2021
@gooddev2021

Spring Application Is A Micro-Service? A confusion

One of my friend creates separate spring boot application for each functions or modules and run as a separate application and calling it as micro-service

I told him is that the microservice? There is a confusion how to treat a application or a service as micro-service

When i searched internet, i observed authentication would be in a separate service...All microservice will run independently

Can some experts give a good back around of micro-service or characteristics of micro-service to clarify the confusions

Thanks

1 reply
Kanai
@kanai0618
Hello Team, How can i get the post body of a route in a pre filter ? currently routes are configured in application yml
Kanai
@kanai0618
Hi can you help with the above query
khalilsleimi
@khalilsleimi
Hi guys, I need your help. I have problems with running Spring Cloud Gateway: https://stackoverflow.com/questions/69313037/spring-cloud-gateway-guide-from-pivotal-not-working-well
khalilsleimi
@khalilsleimi
Just needed to use Spring Cloud 2020.0.3 Instead of Spring Cloud 2020.0.4
Roman S.A.
@eaxdev
Hello evryone! I try use spring cloud config server and vault. I wrote my question here: https://stackoverflow.com/questions/69347177/spring-cloud-config-resolve-secret-propertiers-via-vault-and-git. Any help, plz
Željko Tomić
@ztomic

Hi,

I have issue with custom health indicators / health contributors in application.
I'm using Spring Boot 2.5.5, Spring Cloud 2020.0.4 and Netflix Eureka for service registry/discovery.

If my HealthIndicator returns status DOWN/OUT_OF_SERVICE, then also 'eureka' health check in 'discoveryComposite' is DOWN/OUT_OF_SERVICE and service instance is not visible to other services, but if I implement it as CompositeHealthContributor and it also has status DOWN/OUT_OF_SERVICE, 'eureka' health has status 'UP' and service is visible to other services.

Is this expected behaviour?

1 reply
mrraghavendra
@mrraghavendra
Hi, i am running an issue after upgrade to springboot version 2.4.5 and spring cloud 2020.0.3. I am not able to register service to eureka. In eureka it is showing status as UNKNOWN(1). can anyone help me here
Greg Adams
@gadams00
per https://docs.spring.io/spring-cloud-netflix/docs/3.0.4/reference/html/#using-eureka-on-aws, I’m customizing EurekaInstanceConfigBean using eureka-client's AmazonInfo, but I’m getting an error, and I think it’s due to spring-cloud-netflix excluding archaius
2 replies
Marcin Grzejszczak
@marcingrzejszczak
Please do not cross post. I've seen your question on stackoverflow and commented on it
1 reply
mk
@mk:rwx.im
[m]

Hi, how come my tests fail when I use org.springframework.cloud:spring-cloud-starter-kubernetes-client and org.springframework.cloud:spring-cloud-starter-consul-discovery despite me having spring.cloud.{kubernetes,consul}.enabled=false?
If it's just consul discovery and spring.cloud.consul.enabled=false it works.

The error:

AccountServiceTest > lock_whenUserRequestLock_userShouldBeMarkedAsLocked() FAILED
    java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
        Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException at ConstructorResolver.java:800
            Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException at DefaultListableBeanFactory.java:1790
ah, it works if I only disable discovery with spring.cloud.kubernetes.discovery.enabled=false
Josh Fix
@joshfix
i’m a bit confused as to which modules/strategy to use for spring cloud stream + sqs. It seems stream now uses functions, which is awesome. However, it seems there are new/different aws dependencies: io.awspring.cloud:spring-cloud-starter-aws-messaging and de.idealo.spring:spring-cloud-stream-binder-sqs, but these don’t seem to have documentation supporting the spring cloud function capabilities. do these packages all work in harmony?
mk
@mk:rwx.im
[m]
How come when I use ${spring.cloud.client.hostname} it's the ip address of the network interface and not the local hostname?
Pietro Galassi
@pietrogalassi
Hi all, is it possible to inject ThreadContextKeys into OpenFeign logs ?
Ved Singh
@vedgunjan

Greetings All,
I'm in the process of migrating to SpringBoot 2.5.6 and also to spring-cloud-starter-loadbalancer. I'm not using the Eureka service registry in my system but instead configuring a list of servers in our external configuration.

Versions

springBootVersion=2.5.6
springCloudVersion=2020.0.4

Dependencies

implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
implementation 'org.springframework.cloud:spring-cloud-starter-loadbalancer'

Configuration

productservice:
ribbon:
listOfServers: https://product.service.mycompany.com

Log

RoundRobinLoadBalancer : No servers available for service: productservice
FeignBlockingLoadBalancerClient : Load balancer does not contain an instance for the service productservice

What I understand from the logs is that the problem here is with the creation of a client-side load balancer which is needed for the FeignClient to work.

Can someone here help me with the config that will be needed in the case where you are not using the Eureka service registry?

Ved Singh
@vedgunjan
prasadpr1
@prasadpr1
Hi Team
Any spring devs available for support

Hi Team,

I am facing issue with springencoder in the new version of open feing. It used work fine with earlier versions of spring cloud.
When I debuuged the code, I found this additional code has been added in the new version of SpringEncoder

if (Objects.equals(requestContentType, MediaType.MULTIPART_FORM_DATA)) {
this.springFormEncoder.encode(requestBody, bodyType, request);
return;
}
Earlier my code was using AllEncompassingFormHttpMessageConverter(SpringCloud 2.2.1) when i submitted multivalue map(MULTIFORM_DATA) but now it breaks with new version.

Nickolas Heckman
@nrheckman

I'm working on implementing some new stream processors (PubSub binder) and using spring-boot 2.5.6, with spring-cloud 2020.0.4.
We collect traces with zipkin and I'm noticing that the applications I have built with these latest versions are not getting b3 message attributes attached, so the traceId isn't propagated through like it does with our previously created applications based on spring-boot 2.3.6 and spring-cloud Horsham.SR10.
My "guess" is that I'm missing a dependency that is necessary to get this all wired together that wasn't needed two releases ago? I have the following explicit spring dependencies:

  implementation 'org.springframework.boot:spring-boot-starter-actuator'
  implementation 'org.springframework.boot:spring-boot-starter-data-redis-reactive'
  implementation 'org.springframework.cloud:spring-cloud-sleuth-zipkin'
  implementation 'org.springframework.cloud:spring-cloud-starter-sleuth'
  implementation 'org.springframework.cloud:spring-cloud-stream'
  implementation 'com.google.cloud:spring-cloud-gcp-pubsub-stream-binder'

I'm sure it's documented somewhere, but I'm not finding it. Could I get a pointer in the right direction?

3 replies
Pietro Galassi
@pietrogalassi
Hi all, does Feign always calls same endpoint on failed calls (retry) even if there are multiple pods (openshift) ?
Misagh Moayyed
@mmoayyed

Hello room! In Cloud Config 3.1 RC1, has anything changed that would affect property-source loading, bootstrap context and the like? I am seeing a scenario where bootstrap environment and context is initialized from property sources, but actual application context/environment is not post-processed. It's as if the event listener that does the post processing of the environment never kicks into action for the application context/environment.

I see the two Environemnts created, and the Bootstrap environment is post-processed via the appropriat listener, but it seems like it gets in the way of the actual (servlet) application context. Beans are then created using the Bootstrap context property sources and none of the property sources that are profile-based are not actually read at the right time. They are read later, once after the context has initialized and beans are created, which is too late.

I am running this with Spring Boot 2.6 RC1 and Spring Cloud 3.1 RC1.

Marc Guilera
@marcguilera
hello, we found that spring cloud is now trying to load a bunch of configmaps that it didn't before. the change is spring-cloud/spring-cloud-kubernetes#583 (cc @wind57)
it is debatible if this should be the default behaviour but in any case i'd like to disable it in my project. supposedly it should be as easy as to disableincludeProfileSpecificSources but i wasn't able to properly disable it. here's my bootstrap: https://gist.github.com/marcguilera/b73e2b0d9b5367ac1da7c0e10a7e2f4b
Pedro Silva
@jp-silva
Hello. I'm trying to add etag header to some of the responses that go through spring cloud gateway. I get it that this is not a spring cloud feature (that we do have in spring mvc ShallowEtagHeaderFilter). But it isn't because you don't think it is the right to place to add the header, or it just doesn't exist and it can be implemented as a filter in the gateway? Thanks
Nikita Guchakov
@nguchakov
Hi! What is the right way to implement custom remote property source that supports refresh scope? I tried to check kubernetes and consul implementation, but I didn't get something. I have Bootstrap Configuration with property source locator and the config poller that checks for the remote updates at Autoconfiguration. After any update, it triggers refresh(). However, how can I share new config properties with Properties Source Locator? The behavior is PropertySourceLocator recreates on context refresh. I tried to share some data holder as separate bean, but it seems to be created in bootstrap and main contexts as two separate beans. Kuberenetes client itself goes for the properties twice. Once on polling to check for update and then on property source locator locate() after refresh call.
Petr Vlček
@petrvlcek

Hi, everyone. I'd like to ask for an advice regarding Spring Cloud Consul service discovery and Kubernetes. We are running containers with Spring Boot in AWS EKS. We have an issue with correctly unregistering the instance from Consul when a pod with running container is being deleted. Once the application receives SIGTERM it is given 30 seconds period to shut down gracefully. My observation from logs is that the application tries to unregister from Consul right after receiving the signal, but is unable to make a new connection to Consul even when it still has plenty of time to shut down.

2021-11-30 21:28:51.374  WARN [printer,,,] 1 --- [extShutdownHook] .s.c.a.CommonAnnotationBeanPostProcessor : Destroy method on bean with name 'consulAutoServiceRegistration' threw an exception: com.ecwid.consul.transport.TransportException: org.apache.http.NoHttpResponseException: consul-server.consul.svc.cluster.local:8500 failed to respond

Did you run into similar issue before? I would welcome any advice.

3 replies