yinjihuan / spring-cloud Goto Github PK
View Code? Open in Web Editor NEW《Spring Cloud微服务-全栈技术与案例解析》和《Spring Cloud微服务 入门 实战与进阶》配套源码
Home Page: http://cxytiandi.com
《Spring Cloud微服务-全栈技术与案例解析》和《Spring Cloud微服务 入门 实战与进阶》配套源码
Home Page: http://cxytiandi.com
ch3里面的eureka-client-article-service中的rest请求url不能用localhost,会报错,得改成项目名才能过,为什么?
@GetMapping("/article/callHello")
public String callHello() {
return restTemplate.getForObject(
"http://eureka-client-user-service/user/hello", String.class);
}
我应该按照什么样的顺序依次mvn install?
另外,考虑将所有工程放在一个工程里面,对于看源代码的人更加友好一点
楼主,你好!看了你的书,受益匪浅!关于服务安全,想问一下,最终服务安全的方案是不是:zuul+feign一起使用呢?另外,token放在redis会不会更好?
8.4.2中,该如何使用示例?
- id: customer_route
uri: http://cxytiandi.com
predicates:
- name: CheckAuth
args:
name: yinjihuan
第7章中,运行zuul-demo项目 启动服务访问 http://127.0.0.1:2103/cxytiandi
出现错误,请问怎么办
{ code: 403, message: "非法请求", data: null }
spring-boot-starter-demo如果想被其他工程引用,需要达成jar包,存储在本地maven仓库中,但是给定的源码不能直接打包,主要是测试类报错和找不到主类的错误:
测试类和主类实际上都没必要,可以去掉,原工程中主类已经去掉,但是测试类未去掉;
解决办法:
1.删除测试类;
2.删掉如下插件,这个插件会去找你的Spring Boot主类,找不到会报错:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
3.mvn clean install 本地仓库打包,就可以正常引用jar包了。
如有错误,感谢指正。
spring boot 2.2.0
spring cluod Hoxton.RC1
配置
gateway:
routes:
- id: path_route
uri: http://cxytiandi.com
predicates:
- Path=/course
访问localhost:2001/course报502 Bad Gateway
而换成书上的spring boot 2.0.6.RELEASE spring cloud Finchley.SR2就没问题,这个该怎么解决啊
spring boot2.0 搭建的 不知楼主有尝试过没
这个项目里不少地方都用到cxytiandi-jdbc,但是直接依赖是会报错的,请问这个在哪下载呢?
com.cxytiandi cxytiandi-jdbc 1.0.1在code 2中ch2里的spring-boot-example中的TaskThreadPoolConfig线程池配置类,可以直接从配置文件中读取配置参数,而不用在这里设值
//核心线程数 private int corePoolSize;
//最大线程数 private int maxPoolSize = 50;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.