View Code? Open in Web Editor
NEW
Spring Cloud 学习案例,服务发现、服务治理、链路追踪、服务监控等
Home Page: http://www.ityouknow.com/spring-cloud.html
spring-cloud-examples's Introduction
spring-cloud-examples's People
Contributors
spring-cloud-examples's Issues
我看网上一些资料用的都是brave的采集方式,想确认一下slueth+zipkin能不能采集到sql语句的执行情况
项目由eureka server, eureka client. Hystric+Feigh 三个boot组成,eureka client作为服务,调用本地exe程序,直接通过client的端口访问,调用正常;但是通过Hystric+Feigh 转发到eureka client去调用本地exe程序,当exe在执行的时候,Hystric马上进入fallback状态,已经设置Hystric execution.timeout.enabled:false, 想了解Hystric什么情况下会进入fallback
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapable
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.neo.ConfigServerApplication.main(ConfigServerApplication.java:13)
Caused by: java.lang.ClassNotFoundException: org.springframework.core.env.EnvironmentCapable
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 13 more
spring-cloud-consumer-hystrix 这个工程
application.properties配置文件报错,好像是版本的问题,求答案
在调试的时候发生了这样错误:
java.lang.IllegalArgumentException: Unable to find GatewayFilterFactory with name RequestRateLimiter
这个代码实例,当spring-cloud-config-server更新配置文件之后,spring-cloud-config-client 拿不到配置文件里面的信息。请问怎么调用什么api能做到刷新配置文件信息
因为分布式里多个服务名相同,然后turbine在rabbitmq里面的队列表现出总有数据无法正确ack,所以hystrix-dashboard显示一直有负载,而且显示闪烁不定?
这是我的配置,并且8002服务已启动,下面是报错信息
网上找不到解决方案。有哪位大神遇见同样的错误并且解决了麻烦告知下。
大神你好,我按照你spring-cloud-sleuth-zipkin 进行测试时候,发现zipkin页面打不开
地址:http://localhost:9000/zipkin/
错误信息:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Mon Jun 11 19:39:45 CST 2018
There was an unexpected error (type=Internal Server Error, status=500).
class path resource [zipkin-ui/index.html] cannot be resolved to URL because it does not exist
帮忙看下是什么问题,谢谢
就是问一下大哥,我卡你好多实例都是测试一个用到一个@RefreshScope
我想问下大哥我想在启动类里面加入这个,他会不会一直生效
我使用的springcloud alibaba ,网关也是用了Spring Cloud Gateway
我使用demo netty是可以正常启动成功的,
因为网关也集成netty,所以我就没有引入netty包
debug断点看了一下,也是没有进入
遇到一个项目 要求OAuth2实现单点登录,权限认证 并整合zuul
zipkin在springboot2.0以上的版本怎么无用?
spring-cloud gateway 限流真的好使吗?
下载下来的所有项目,编译通过后, 启动全部报这个异常
Exception in thread "main" java.lang.NoClassDefFoundError:
简直无解。。。。
spring.application.cloud.config.server.git.uri和spring.application.cloud.config.server.git.search-paths如果要用自己的应该怎么配置 client去连总是失败
希望增加spring cloud security 集成 oauth2.0 和JWT的用户认证、鉴权部分。
这个教程能更完整。
我的双server中,总是显示unavailable-replicas,两个节点都是。不知道什么原因。我用了两个域名还是不行,用ip也不行。莫非要真的不同的物理机器才行?
右键不能运行项目, 我想整体启动看下效果,而不是一个个单个的项目
好像用的都是spring 1.5的版本吧,怎么说是spring2.0的教程,不过帮助真的很大,感谢作者的开源
1.启动 Eureka Server
2.启动 Eureka Client
3.启动 Ribbon
4.请求 Ribbon 中的服务,可以正常访问
5.此时关闭 Eureka Client
6.再次请求 Ribbon 中的服务,显示错误
7.再次启动 Eureka Client ,并访问 Ribbon 的服务依然不能正常访问
那么怎么自动检测服务的状态呢?就是怎么在第7步拿到一个正常的结果呢?
https://github.com/ityouknow/spring-cloud-examples/tree/master/spring-boot-admin-eureka
讲版本升级到了2.0.x
能正常启动 但是总是后台总是定时打印这些异常
2018 -06 -26 10 :20 :09.197 ERROR 27180 --- [nio -8000 -exec -1 ] o .a .c .c .C .[.[.[/].[dispatcherServlet ] : Servlet .service () for servlet [dispatcherServlet ] threw exception
java .io .IOException : 你的主机中的软件中止了一 个已建立的连接。
at sun .nio .ch .SocketDispatcher .write0 (Native Method ) ~[na :1.8 .0_40 ]
at sun .nio .ch .SocketDispatcher .write (SocketDispatcher .java :51 ) ~[na :1.8 .0_40 ]
at sun .nio .ch .IOUtil .writeFromNativeBuffer (IOUtil .java :93 ) ~[na :1.8 .0_40 ]
at sun .nio .ch .IOUtil .write (IOUtil .java :65 ) ~[na :1.8 .0_40 ]
at sun .nio .ch .SocketChannelImpl .write (SocketChannelImpl .java :471 ) ~[na :1.8 .0_40 ]
at org .apache .tomcat .util .net .NioChannel .write (NioChannel .java :134 ) ~[tomcat -embed -core -8.5 .31. jar :8.5 .31 ]
at org .apache .tomcat .util .net .NioBlockingSelector .write (NioBlockingSelector .java :101 ) ~[tomcat -embed -core -8.5 .31. jar :8.5 .31 ]
at org .apache .tomcat .util .net .NioSelectorPool .write (NioSelectorPool .java :157 ) ~[tomcat -embed -core -8.5 .31. jar :8.5 .31 ]
at org .apache .tomcat .util .net .NioEndpoint$NioSocketWrapper .doWrite (NioEndpoint .java :1276 ) ~[tomcat -embed -core -8.5 .31. jar :8.5 .31 ]
at org .apache .tomcat .util .net .SocketWrapperBase .doWrite (SocketWrapperBase .java :670 ) ~[tomcat -embed -core -8.5 .31. jar :8.5 .31 ]
at org .apache .tomcat .util .net .SocketWrapperBase .flushBlocking (SocketWrapperBase .java :607 ) ~[tomcat -embed -core -8.5 .31. jar :8.5 .31 ]
at org .apache .tomcat .util .net .SocketWrapperBase .flush (SocketWrapperBase .java :597 ) ~[tomcat -embed -core -8.5 .31. jar :8.5 .31 ]
at org .apache .coyote .http11 .Http11OutputBuffer$SocketOutputBuffer .flush (Http11OutputBuffer .java :646 ) ~[tomcat -embed -core -8.5 .31. jar :8.5 .31 ]
at org .apache .coyote .http11 .filters .ChunkedOutputFilter .flush (ChunkedOutputFilter .java :169 ) ~[tomcat -embed -core -8.5 .31. jar :8.5 .31 ]
at org .apache .coyote .http11 .Http11OutputBuffer .flush (Http11OutputBuffer .java :252 ) ~[tomcat -embed -core -8.5 .31. jar :8.5 .31 ]
at org .apache .coyote .http11 .Http11Processor .flush (Http11Processor .java :1564 ) ~[tomcat -embed -core -8.5 .31. jar :8.5 .31 ]
at org .apache .coyote .AbstractProcessor .action (AbstractProcessor .java :352 ) ~[tomcat -embed -core -8.5 .31. jar :8.5 .31 ]
at org .apache .coyote .Response .action (Response .java :173 ) ~[tomcat -embed -core -8.5 .31. jar :8.5 .31 ]
at org .apache .catalina .connector .OutputBuffer .doFlush (OutputBuffer .java :317 ) ~[tomcat -embed -core -8.5 .31. jar :8.5 .31 ]
at org .apache .catalina .connector .OutputBuffer .flush (OutputBuffer .java :284 ) ~[tomcat -embed -core -8.5 .31. jar :8.5 .31 ]
at org .apache .catalina .connector .CoyoteOutputStream .flush (CoyoteOutputStream .java :118 ) ~[tomcat -embed -core -8.5 .31. jar :8.5 .31 ]
at org .springframework .security .web .util .OnCommittedResponseWrapper$SaveContextServletOutputStream .flush (OnCommittedResponseWrapper .java :514 ) ~[spring -security -web -5.0 .6. RELEASE .jar :5.0 .6. RELEASE ]
at org .springframework .security .web .util .OnCommittedResponseWrapper$SaveContextServletOutputStream .flush (OnCommittedResponseWrapper .java :514 ) ~[spring -security -web -5.0 .6. RELEASE .jar :5.0 .6. RELEASE ]
at sun .nio .cs .StreamEncoder .implFlush (StreamEncoder .java :297 ) ~[na :1.8 .0_40 ]
at sun .nio .cs .StreamEncoder .flush (StreamEncoder .java :141 ) ~[na :1.8 .0_40 ]
at java .io .OutputStreamWriter .flush (OutputStreamWriter .java :229 ) ~[na :1.8 .0_40 ]
at org .springframework .util .StreamUtils .copy (StreamUtils .java :121 ) ~[spring -core -5.0 .7. RELEASE .jar :5.0 .7. RELEASE ]
at org .springframework .http .converter .StringHttpMessageConverter .writeInternal (StringHttpMessageConverter .java :103 ) ~[spring -web -5.0 .7. RELEASE .jar :5.0 .7. RELEASE ]
at org .springframework .http .converter .StringHttpMessageConverter .writeInternal (StringHttpMessageConverter .java :43 ) ~[spring -web -5.0 .7. RELEASE .jar :5.0 .7. RELEASE ]
at org .springframework .http .converter .AbstractHttpMessageConverter .write (AbstractHttpMessageConverter .java :224 ) ~[spring -web -5.0 .7. RELEASE .jar :5.0 .7. RELEASE ]
at org .springframework .web .servlet .mvc .method .annotation .ResponseBodyEmitterReturnValueHandler$HttpMessageConvertingHandler .sendInternal (ResponseBodyEmitterReturnValueHandler .java :199 ) ~[spring -webmvc -5.0 .7. RELEASE .jar :5.0 .7. RELEASE ]
at org .springframework .web .servlet .mvc .method .annotation .ResponseBodyEmitterReturnValueHandler$HttpMessageConvertingHandler .send (ResponseBodyEmitterReturnValueHandler .java :189 ) ~[spring -webmvc -5.0 .7. RELEASE .jar :5.0 .7. RELEASE ]
at org .springframework .web .servlet .mvc .method .annotation .ResponseBodyEmitter .sendInternal (ResponseBodyEmitter .java :189 ) ~[spring -webmvc -5.0 .7. RELEASE .jar :5.0 .7. RELEASE ]
at org .springframework .web .servlet .mvc .method .annotation .ResponseBodyEmitter .send (ResponseBodyEmitter .java :183 ) ~[spring -webmvc -5.0 .7. RELEASE .jar :5.0 .7. RELEASE ]
at org .springframework .web .servlet .mvc .method .annotation .SseEmitter .send (SseEmitter .java :133 ) ~[spring -webmvc -5.0 .7. RELEASE .jar :5.0 .7. RELEASE ]
at org .springframework .web .servlet .mvc .method .annotation .ReactiveTypeHandler$SseEmitterSubscriber .send (ReactiveTypeHandler .java :341 ) ~[spring -webmvc -5.0 .7. RELEASE .jar :5.0 .7. RELEASE ]
at org .springframework .web .servlet .mvc .method .annotation .ReactiveTypeHandler$AbstractEmitterSubscriber .run (ReactiveTypeHandler .java :283 ) ~[spring -webmvc -5.0 .7. RELEASE .jar :5.0 .7. RELEASE ]
at java .lang .Thread .run (Thread .java :745 ) [na :1.8 .0_40 ]
2018 -06 -26 10 :20 :09.202 ERROR 27180 --- [nio -8000 -exec -1 ] o .a .c .c .C .[.[.[/].[dispatcherServlet ] : Servlet .service () for servlet [dispatcherServlet ] in context with path [] threw exception
项目地址: https://github.com/springseries/springboot-admin-demo/tree/master/bootadmin
不知道你开发过程中遇到这个问题没有?
能非常简单地开始project么?
一个主题下的几个project作为几个module,一个主题作为一个project,这种父子关系,这样idea可以非常方便地将一个主题打开运行