All Questions

Filter by
Sorted by
Tagged with
376 votes
9 answers
177k views

What is the difference between putting a property on application.yml or bootstrap.yml in spring boot?

What is the difference between putting a property on application.yml or bootstrap.yml in spring boot? In logging.config case, the application works differently.
Rys's user avatar
  • 5,034
119 votes
6 answers
161k views

Is there a compatibility matrix of Spring-boot and Spring-cloud?

I am wondering if a compatibility matrix exists between Springboot and Springcloud? I created a simple project on STS and am running into compatibility issues. <parent> <groupId&...
Manglu's user avatar
  • 11k
69 votes
10 answers
138k views

springboot Upgrade from 2.3.5.RELEASE to 2.4.1- ClassNotFoundException: org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadata

I am trying to upgrade my kotlin - gradle project from springboot version 2.3.5.RELEASE to 2.4.1. Looks like there is version mismatch between springboot-2.4.1 and sping-cloud-Hoxton.SR9. build.gradle....
KarthiK's user avatar
  • 871
57 votes
7 answers
79k views

What are the advantages and disadvantages of using feign over RestTemplate

I get that Feign is declarative and hence it abstracts out a lot of things for the developer. But, when should one choose one over the other? Though feign is declarative, it has serious problems with ...
codingsplash's user avatar
  • 4,945
53 votes
3 answers
51k views

bootstrap.yml configuration not processed anymore with Spring Cloud 2020.0

In my Spring Boot project, I defined 4 profiles demo dev test prod properties in YAML files will be replaced by HashiCorp Vault properties during startup. For this, I use Spring Cloud Vault library. ...
Pavan Jadda's user avatar
  • 4,696
53 votes
8 answers
103k views

Property 'spring.profiles.active' imported from location 'class path resource [application-dev.yml]' is invalid

I updated Spring cloud application to the latest Spring boot version 2.5.0. But during startup I get this exception: 11:05:05.038 [main] ERROR org.springframework.boot.SpringApplication - Application ...
Peter Penzov's user avatar
  • 1,290
39 votes
11 answers
76k views

Spring Cloud AWS SQS fails to connect to service endpoint locally

I'm trying to use Spring Cloud's AWS SQS in a project I'm working on. At this time, I'm only running the application locally on my dev machine. Thus, what I want is to connect to the SQS on AWS ...
Carven's user avatar
  • 15.3k
37 votes
2 answers
21k views

Spring Cloud or Spring Boot? what is right spring project for developing Biz API's?

We are trying to build a new Business API layer in between UI and applications/services. Which project in spring is best and will serve the needs for developing Biz Api's with restful services? Is ...
SpringForLiving's user avatar
36 votes
2 answers
15k views

Unable to use Spring cloud to connect with AWS SES

I have made a very simple maven project using Spring Boot. I am trying to connect with AWS SES using Spring cloud. While running the project, I am getting following error: No valid instance id ...
Abhinav's user avatar
  • 3,380
31 votes
8 answers
70k views

Cannot disable Spring Cloud Config via spring.cloud.config.enabled:false

Let me preface this by saying that I'm not using Spring Cloud Config directly, it is transitive via Spring Cloud Hystrix starter. When only using @EnableHystrix, Spring Cloud also tries to locate a ...
bvulaj's user avatar
  • 5,043
30 votes
4 answers
16k views

Understanding Spring Cloud Release Versions

Spring folks do a great job of releasing lots of quality projects. One of them we have been using is Spring Cloud and its various sub-projects. One aspect that is really confusing to me is Spring ...
singularity's user avatar
  • 1,057
28 votes
4 answers
66k views

Spring Cloud Gateway - Proxy/Forward the entire sub part of URL

I am using Spring Cloud Gateway 2.0.0.M6 testing a simple gateway. I just want a URL to be forwarded to another URL with ** regex Example 1: /integration/sbl/foo/bar => localhost:4178/a-integration/...
Shervin Asgari's user avatar
28 votes
3 answers
30k views

Using Zuul as an authentication gateway

Background I want to implement the design presented in this article. It can be summarised by the diagram below: The client first authenticate with the IDP (OpenID Connect/OAuth2) The IDP returns an ...
phoenix7360's user avatar
  • 2,857
28 votes
3 answers
17k views

Unable to get EnableOauth2Sso Working -- BadCredentialsException: Could not obtain access token

I'm trying to get a simple Spring OAuth2 SSO application working and I've been unable to do so. Here's the steps and results of what's happened: Hit endpoint /user, which is secured by OAuth2 I get ...
Centinul's user avatar
  • 874
27 votes
4 answers
50k views

How to ask Spring Cloud Config server to checkout configuration from specific branch?

I have following Spring cloud config application.yml: spring: application: name: configserver cloud: config: server: git: uri: https://[email protected]/...
AGupta's user avatar
  • 5,645
27 votes
7 answers
38k views

SpringCloud 2020.0.2 upgrade generates testing error

I'm trying to upgrade a project from SpringCloud BOM 2020.0.1 to 2020.0.2 When I change the BOM and re-build, I get an error in JUnit tests, saying that the new parameter spring.config.import is not ...
Sourcerer's user avatar
  • 2,001
27 votes
6 answers
85k views

How to get custom user info from OAuth2 authorization server /user endpoint

I have a resource server configured with @EnableResourceServer annotation and it refers to authorization server via user-info-uri parameter as follows: security: oauth2: resource: user-...
S. Pauk's user avatar
  • 5,298
25 votes
7 answers
31k views

Customizing Zuul Exception

I have a scenario in Zuul where the service that the URL is routed too might be down . So the reponse body gets thrown with 500 HTTP Status and ZuulException in the JSON body response. { "timestamp"...
Grinish Nepal's user avatar
25 votes
1 answer
50k views

Configuring hystrix command properties using application.yaml in Spring-Boot application

I am having same issue, where i am trying to override the hystrix properties in application.yaml. When I run the app & check the properties with localhost:port/app-context/hystrix.stream, I get ...
Amrut's user avatar
  • 981
23 votes
8 answers
33k views

bootstrap.yml not loading in Spring Boot 2

I'm experiencing a problem when starting a spring boot client application that needs to connect to the configuration server. The bootstrap.yml file is being ignored Configuration Server - This works! ...
Renan Lalier's user avatar
23 votes
4 answers
42k views

SpringCloudGateway - Log incoming request url and corresponding route URI

I am new to spring cloud gateway, what I want is to log incoming request to corresponding route url, For e.g. if I have following route config: - id: route1 uri: http://localhost:8585/ ...
JavaCodeNet's user avatar
  • 1,145
22 votes
2 answers
16k views

Spring Boot + Eureka Server + Hystrix with Turbine: empty turbine.stream

I'm trying to run Spring Boot (with Spring Cloud) + Eureka Server + Hystrix Dashboard and Turbine stream, but I run into a problem I couldn't find any solution so far. I use Spring Boot 1.2.1.RELEASE ...
Szymon Stepniak's user avatar
20 votes
3 answers
29k views

Is there a way to use Spring Cloud {cipher} in Spring Boot application config?

I have a Spring Boot app that is using Spring Cloud Config but I would like to encrypt the Spring Cloud Config password in the Spring Boot apps bootstrap.yml file. Is there a way to do this? Below is ...
Brian Abston's user avatar
20 votes
4 answers
68k views

Spring Cloud Config Server Can't locate PropertySource on startup

When I start my Spring Cloud Config Server I get the following error. Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/configserver/default/master":Connection ...
Brian Abston's user avatar
19 votes
7 answers
51k views

com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect in Spring Boot

I am developing code from http://www.javainuse.com/spring/spring-cloud-netflix-zuul-tutorial, no customization yet. I keep getting the error mentioned below. So, to avoid this error I added the ...
Jeff Cook's user avatar
  • 8,646
18 votes
8 answers
31k views

Spring Boot API Gateway Unable to resolve name

Api calls via gateway throws java.net.UnknownHostException even though I am able to hit the application directly with the given hostname Spring Boot version : 2.4.2 Spring-cloud.version: 2020.0.1 Java ...
Anonymous's user avatar
  • 335
18 votes
4 answers
18k views

Authentication issue with repo accessed from Spring Cloud Config Server hosted on GitHub

I'm hosting a configuration in a repo on GitHub. If I keep the repo public all's good, but if I make it private I face: org.eclipse.jgit.errors.TransportException: https://github.com/my-user/my-...
learnAndImprove's user avatar
17 votes
7 answers
33k views

Spring Cloud - Zuul Proxy is producing a No 'Access-Control-Allow-Origin' ajax response

Startup Appplication: @SpringBootApplication @EnableZuulProxy public class ZuulServer { public static void main(String[] args) { new SpringApplicationBuilder(ZuulServer.class).web(true)...
Given's user avatar
  • 705
17 votes
2 answers
18k views

springboot could not found feignclient

ERROR INFO LIKE BELOW: *************************** APPLICATION FAILED TO START *************************** Description: Field helloAgent in com.example.client.controller.Hello required a bean of ...
ajianzheng's user avatar
17 votes
5 answers
26k views

Using Spring Boot, how do I see debug info for Zuul?

I am trying to use Zuul within my Spring Boot project. application.properties server.context-path=/${spring.application.name} zuul.routes.engine.path=/api/engine/** zuul.routes.engine.url=${engine....
Eric Francis's user avatar
  • 23.7k
17 votes
7 answers
49k views

Feign client and Spring retry

I have a restful service calling an external service using Spring Cloud Feign client @FeignClient(name = "external-service", configuration = FeignClientConfig.class) public interface ServiceClient { ...
Satya's user avatar
  • 348
16 votes
7 answers
41k views

Ribbon with Spring Cloud and Eureka: java.lang.IllegalStateException: No instances available for Samarths-MacBook-Pro.local

I am working on Spring Boot Eureka Client Application with Ribbon Load Balancer. I have two instances of the server registered with Eureka with the name "TEST". On the client side, I have the ...
Samarth's user avatar
  • 233
16 votes
4 answers
29k views

Post Spring Boot 3 update - Unable to instantiate factory class [org.springframework.cloud.config.client.ConfigServerConfigDataLocationResolver]

I've updated backend service to use latest Spring Boot 3, however after update, SB application fails due to some issues with setting up deferred logs during config load. Could anyone help with the ...
user1584564's user avatar
16 votes
2 answers
7k views

How to implement OAuth2 "Token Exchange" with Spring Cloud Security

I would like to know if someone has an example to see how to implement "Token Exchange" technique with Spring Cloud Security (with OAuth2). Currently I have implemented "Token Relay&...
miguelfgar's user avatar
15 votes
3 answers
20k views

Why bootstrap.properties is ignored by spring-cloud-starter-config?

My goal is to get the config for world-service from a config-service. The architecture: config-service with dependency spring-cloud-config-server at localhost:8888 world-service with dependency the ...
Jason Rich Darmawan's user avatar
15 votes
4 answers
14k views

Detecting refreshing of RefreshScope beans

It is my understanding that when you use Spring Cloud's RefreshScope annotation, a Proxy to the data is injected, and the proxy is automatically updated if the backing information is changed. ...
Cobra1117's user avatar
  • 1,292
15 votes
6 answers
23k views

SpringBoot @SqsListener - not working - with Exception - TaskRejectedException

I have a AWS SQS with 5000 messages already on the Queue (Sample Message looks like this 'Hello @ 1') I created a SpringBoot Application and inside one of the Component Classes create a method to read ...
Hbargujar's user avatar
  • 370
15 votes
1 answer
11k views

What is the difference between spring-boot-starter-oauth2-client, spring-cloud-starter-oauth2 and spring-security-oauth2

I am developing a client application for client_credentials grant type flow in OAUTH2. I am not able to decide on which dependency to use in my project for this purpose among the following. spring-...
Suthan S M's user avatar
15 votes
1 answer
12k views

Using Spring boot/cloud with Amazon AWS lambda does not inject values

I have an AWS lambda RequestHandler class which is invoked directly by AWS. Eventually I need to get it working with Spring Boot because I need it to be able to retrieve data from Spring Cloud ...
mindas's user avatar
  • 26.6k
15 votes
2 answers
13k views

spring-security-oauth2 vs spring-cloud-starter-oauth2

I am working on building an oAuth2 application using spring boot. However, there are various sample projects in Github using spring-security-oauth2 and spring-cloud-starter-oauth2. Do we have specific ...
Shweta Gupta's user avatar
14 votes
5 answers
19k views

EnableEurekaClient import doesn't exist

I added spring-cloud-starter-netflix-eureka-client gradle depedency in my project and shrik the depedency. But when go use @EnableEurekaClient in my Main class it show me suggestion create @...
Mama's user avatar
  • 605
14 votes
4 answers
13k views

How does Spring Cloud Sleuth propagate the MDC context in Webflux ouf of the box so that its content can be logged in different threads?

I'd like to know how Spring Cloud Sleuth propagates the MDC context between threads making the MDC params available each of them. I've read this article https://simonbasle.github.io/2018/02/...
codependent's user avatar
  • 23.9k
14 votes
1 answer
10k views

Prevent spring-cloud-aws-messaging from trying to stop the queue

I'm using spring-cloud-aws-messaging in a Spring Boot project. I have SQS queue created manually in AWS. It is being used like: @SqsListener("${sqs.name.incoming}") public void listen(String message)...
Kartik's user avatar
  • 7,757
14 votes
3 answers
9k views

Include common config for multiple apps in Spring Cloud Config server

I'm trying to migrate our stable of app servers to get their configuration from a Spring Cloud Config server. Each app has a {my-app}.yml file on the config server and we can use profiles (either in ...
Sonafets's user avatar
  • 497
14 votes
1 answer
10k views

Difference between Ribbon circuit breaker and Hystrix

I'm giving a try to Spring Cloud and Spring Boot. It uses Netflix OSS Applications, among them there are Ribbon and Hystrix. Ribbon is a load balancer and comes with some features, one of them is a ...
reos's user avatar
  • 8,216
13 votes
6 answers
34k views

actuator /refresh is not being provided in SpringBoot 2.0.1

I am creating a demo project for Spring-Config-Server and Spring-Config-Client. In SpringBoot 1.5.6.RELEASE everything is working fine. However, when I am upgrading project to 2.0.1.RELEASE it does ...
Mehraj Malik's user avatar
  • 15.3k
12 votes
3 answers
18k views

No plugin found for prefix 'docker' in the current project and in the plugin groups

deploy Spring Cloud project with docker, some code in the pom.xml: <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> ...
Python Basketball's user avatar
12 votes
1 answer
4k views

spring-cloud-aws not able to put files to S3 when run from EC2

I am trying to put some files in S3 bucket through my Spring Boot app using AmazonS3Client. In AWS, I created an IAM user (test_user1) and granted S3 full access rights to this user. Also in S3, I ...
vijay sarathi's user avatar
12 votes
1 answer
10k views

Spring Cloud Zuul/Eureka dynamic route

I am using spring cloud eureka and spring cloud zuul proxy and i was wondering if there is any way to add dymanic zuul routes when a new service is register in eureka server or the only way to add a ...
alfespa17's user avatar
  • 345
12 votes
3 answers
21k views

Spring Boot Actuator endpoints with set server.context-path

In spring boot app I set e.g. server.context-path=/mymodule. This is convenient because I don't need to repeat over and over again /mymodule prefix in @RequestMapping. Further I want to have actuator ...
Łukasz Idkowiak's user avatar

1
2 3 4 5
48