spring-cloud

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

空扰寡人 提交于 2021-02-18 05:16:23
问题 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 scenarios where we can use a specific jar among both for an application? Though Spring cloud is mainly used for distributed systems. There are a lot of implementations on Github using spring-cloud-starter-oauth2 for even non-distributed applications. Thanks. 回答1: To resolve complex dependency

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

房东的猫 提交于 2021-02-18 05:16:21
问题 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 scenarios where we can use a specific jar among both for an application? Though Spring cloud is mainly used for distributed systems. There are a lot of implementations on Github using spring-cloud-starter-oauth2 for even non-distributed applications. Thanks. 回答1: To resolve complex dependency

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

混江龙づ霸主 提交于 2021-02-18 05:16:02
问题 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 scenarios where we can use a specific jar among both for an application? Though Spring cloud is mainly used for distributed systems. There are a lot of implementations on Github using spring-cloud-starter-oauth2 for even non-distributed applications. Thanks. 回答1: To resolve complex dependency

Spring cloud function [Azure] TimerTrigger

江枫思渺然 提交于 2021-02-11 13:31:36
问题 Anybody has Spring cloud Function [Azure] TimerTrigger sample implementation ?Please do share 回答1: I was able to get this running by doing the following (this is based off the HttpTrigger code): Create the handler that has the TimerTrigger: @Component public class TimerHandler extends AzureSpringBootRequestHandler<User, Greeting> { @FunctionName("timedTrigger") public void timedTrigger( @TimerTrigger(name = "trigger", schedule = "0 */30 * * * *") String timerInfo, ExecutionContext context) {

Spring Boot Binder API support for @Value Annotations

試著忘記壹切 提交于 2021-02-11 13:12:40
问题 I am using the Spring Boot Binder API in an EnvironmentPostProcessor (i.e. before the actual application context(s) is (are) refreshed) to bind a custom ConfigurationProperty object. I want users to have to specify exactly one mandatory property in application.yml : com.acme.kafka.service-instance-name: <user-provided value> . Given that, I will be able to derive the other (required but not mandatory to be put in by the user) properties: com: acme: kafka: username: <can be fetched from VCAP

Publish Spring Cloud Contract verification to Pact broker

♀尐吖头ヾ 提交于 2021-02-11 13:10:34
问题 Is it possible to publish Spring Cloud Contract Producer verification to a Pact broker? 回答1: You would have to convert the DSL to Pact files and then push those. So technically that is possible. Update: We describe how to do this in the documentation - https://cloud.spring.io/spring-cloud-contract/reference/html/howto.html#how-to-generate-pact-from-scc Since in SO it seems that an answer "Check the docs" is not an accepted one, let me just copy paste the documentation How Can I Generate Pact,

spring cloud config searchPaths

送分小仙女□ 提交于 2021-02-10 23:39:37
问题 I'm looking at implementing the 12factor approach to externalising config via Spring Cloud Config but am not able to get the wildcards working using searchPaths as I expected. The documentation http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html#_spring_cloud_config_server mentions that wildcards {application}, {label}, {profile} can be used within the searchPaths variable so that "you can segregate the directories in the path, and choose a strategy that makes sense for you (e

Spring Cloud Stream topic per message for different consumers

為{幸葍}努か 提交于 2021-02-10 12:49:13
问题 The topology I am looking for is So far I have not seen a way to define the topic per message in Cloud Stream. I understand that the consumers will be bound to specific topic but how does the producer sets the topic per message before sending the message to the exchange? source.output().send(MessageBuilder.withPayload(myMessage).build()); Does not provide any way to set the topic for the exchange to route to the proper consumer. Or maybe I don't understand something correctly? UPDATE I would

Spring Cloud Stream topic per message for different consumers

99封情书 提交于 2021-02-10 12:49:11
问题 The topology I am looking for is So far I have not seen a way to define the topic per message in Cloud Stream. I understand that the consumers will be bound to specific topic but how does the producer sets the topic per message before sending the message to the exchange? source.output().send(MessageBuilder.withPayload(myMessage).build()); Does not provide any way to set the topic for the exchange to route to the proper consumer. Or maybe I don't understand something correctly? UPDATE I would

How to recover from exceptions sent by producer.send() in Spring Cloud Stream

99封情书 提交于 2021-02-10 07:48:36
问题 We experienced the following scenario : We have a Kafka cluster composed of 3 nodes, each topic created has 3 partitions A message is sent through MessageChannel.send() , producing a record for, let's say, partition 1 The broker acting as the partition leader for that partition fails By default, MessageChannel.send() returns true and doesn't throw any exception, even if, eventually, the KafkaProducer can't send successfully the message. We observe, about 30 seconds after this call, the