spring-microservices-in-action
spring-microservices-in-action copied to clipboard
Errors in book
- Page109: to see organization service is in registry, the url is "http://localhost:8761/eureka/apps/ORGANIZATIONSERVICE", not "http://localhost:8761/eureka/apps/organizationservice"
- Page242: configuration should be
spring.cloud
, notspring.application
- Page248: you need to add Content-Type: application/json in headers, otherwise it will give you the error "415 Unsupported Media Type" in response
- Page255: need to specify the client type as "rest" so that it will call the organization service with Redis logic.
Correct: http://localhost:8080/v1/organizations/e254f8c-c442-4ebe-a82a-e2fc1d1ff78a/licenses/f3831f8c-c338-4ebe-a82a-e2fc1d1ff78a/rest
Wrong: http://localhost:8080/v1/organizations/e254f8c-c442-4ebe-a82a-e2fc1d1ff78a/licenses/f3831f8c-c338-4ebe-a82a-e2fc1d1ff78a
(This will not get organization record and also will not trigger Redis logic)
In Section 9.3, Zuul server, licensing service and organization service will send trace to Zipkin server.
Originally licensing service and organization service are integrated with Kafka message queue. So spring-cloud-starter-stream-kafka
is in the classpath (build.gradle).
For send trace to Zipkin, if spring-cloud-starter-stream-kafka
is in the classpath, it will send trace to Zipkin by Kafka message queue. But Zipkin is not integrated with Kafka. So Zipkin will not receive the trace from licensing service and organization.
So the missing step is that we need to specify the way for sending the trace
spring.zipkin.sender.type: web
For storing users' credentials in DB, the spring security will check users
table and authorities
table. But in the book/ the original source code of the book, it uses users
table and user_roles
table. Need to replace user_roles
table by authorities
table.
For users
table, the user_name
column is not correct. It should be username
otherwise if you store users' credentials to DB, it will give an error.
So need to replace