草庐IT

hcie-cloud

全部标签

spring - 我应该如何在包含在 EC2 实例中的 Docker 中使用 Netflix Zuul 和 Eureka 配置 Spring Cloud

我正在评估使用SpringBoot和SpringCloud(Zuul和Eureka)构建微服务,这些微服务在单独的docker容器中运行,部署在单独的AmazonEC2实例中。我有一个向Eureka注册的简单REST服务,并已将Zuul配置为通过在Eureka中查找来将请求路由到该服务。我可以使用boot2docker在我的Mac上本地(即不在Amazon/EC2中)运行它,但是当部署在EC2上时,Zuul找不到该服务,并且报告“转发错误”(状态500)。在EC2中,所有内容都配置为在端口80上运行(只是在评估时,我可以轻松地通过我们的防火墙访问)。我可以在Eureka系统状态页面中看

spring - Zookeeper 与 Spring Cloud 配置服务器有什么区别?

zookeeper和spring云配置服务器有什么区别?它们都将配置存储在服务器中并使它们可供客户端使用。什么时候应该使用一个而不是另一个? 最佳答案 What'sthedifferencebetweenzookeepervsspringcloudconfigserver?使用SpringCloudConfigServer,您可以集中管理所有环境中应用程序的外部属性。配置服务器上的概念与SpringEnvironment和PropertySource抽象相同,因此它们非常适合Spring应用程序,但可以可用于以任何语言运行的任何应用

spring - Zookeeper 与 Spring Cloud 配置服务器有什么区别?

zookeeper和spring云配置服务器有什么区别?它们都将配置存储在服务器中并使它们可供客户端使用。什么时候应该使用一个而不是另一个? 最佳答案 What'sthedifferencebetweenzookeepervsspringcloudconfigserver?使用SpringCloudConfigServer,您可以集中管理所有环境中应用程序的外部属性。配置服务器上的概念与SpringEnvironment和PropertySource抽象相同,因此它们非常适合Spring应用程序,但可以可用于以任何语言运行的任何应用

java - Spring Cloud Configuration Server 不使用本地属性文件

我一直在玩github上的SpringCloud项目:https://github.com/spring-cloud/spring-cloud-config但是,我在让它读取本地属性文件而不是从github中提取属性时遇到了一些问题。即使我删除了对github的所有引用,spring似乎也忽略了本地文件。这里发布了一个类似的问题:Spring-Cloudconfigurationserverignoresconfigurationpropertiesfile但我还没有看到任何好的答案。我想知道是否有人可以指出我的例子?我想在本地设置我的属性,而不是使用任何类型的gitrepo。我想有人

java - Spring Cloud Configuration Server 不使用本地属性文件

我一直在玩github上的SpringCloud项目:https://github.com/spring-cloud/spring-cloud-config但是,我在让它读取本地属性文件而不是从github中提取属性时遇到了一些问题。即使我删除了对github的所有引用,spring似乎也忽略了本地文件。这里发布了一个类似的问题:Spring-Cloudconfigurationserverignoresconfigurationpropertiesfile但我还没有看到任何好的答案。我想知道是否有人可以指出我的例子?我想在本地设置我的属性,而不是使用任何类型的gitrepo。我想有人

java - Spring Cloud - Zuul 代理正在生成 No 'Access-Control-Allow-Origin' ajax 响应

启动应用程序:@SpringBootApplication@EnableZuulProxypublicclassZuulServer{publicstaticvoidmain(String[]args){newSpringApplicationBuilder(ZuulServer.class).web(true).run(args);}}我的YAML文件是这样的:server:port:8080spring:application:name:zuuleureka:client:enabled:trueserviceUrl:defaultZone:http://localhost:876

java - Spring Cloud - Zuul 代理正在生成 No 'Access-Control-Allow-Origin' ajax 响应

启动应用程序:@SpringBootApplication@EnableZuulProxypublicclassZuulServer{publicstaticvoidmain(String[]args){newSpringApplicationBuilder(ZuulServer.class).web(true).run(args);}}我的YAML文件是这样的:server:port:8080spring:application:name:zuuleureka:client:enabled:trueserviceUrl:defaultZone:http://localhost:876

spring - 如何保护 Spring Cloud Config Server

我了解SpringCloudConfigServer可以使用用户名和密码进行保护,该用户名和密码必须由访问客户端提供。Howcanipreventtheclientsfromstoringtheseusernameandpasswordascleartextinthebootstrap.ymlfilesintheclientapplication/services? 最佳答案 非常基本的“基本身份验证”(从这里https://github.com/spring-cloud-samples/configserver)您可以通过包含对S

spring - 如何保护 Spring Cloud Config Server

我了解SpringCloudConfigServer可以使用用户名和密码进行保护,该用户名和密码必须由访问客户端提供。Howcanipreventtheclientsfromstoringtheseusernameandpasswordascleartextinthebootstrap.ymlfilesintheclientapplication/services? 最佳答案 非常基本的“基本身份验证”(从这里https://github.com/spring-cloud-samples/configserver)您可以通过包含对S

Spring-Kafka 与 Spring-Cloud-Stream (Kafka)

在微服务架构中使用Kafka作为消息系统使用spring-kafka与spring-cloud-stream+spring-cloud-starter-stream-kafka有什么好处?SpringCloudStream框架支持更多的消息系统,因此具有更模块化的设计。但是功能呢?spring-kafka和spring-cloud-stream+spring-cloud-starter-stream-kafka的功能有差距吗?哪个API设计得更好?期待阅读您的意见 最佳答案 带有kafkabinder的SpringCloudStre