January 2018
Intermediate to advanced
414 pages
10h 29m
English
Now, that we have this service, we may change our Spring Context to create a bean for this service and remove the original customer bean. We just need to change our Chapter3Application.kt to remove the bean and just leave it as a simple class:
package com.microservices.chapter3import org.springframework.boot.autoconfigure.SpringBootApplicationimport org.springframework.boot.runApplication@SpringBootApplicationclass Chapter3Applicationfun main(args: Array<String>) { runApplication<Chapter3Application>(*args)}
Then we will annotate our service implementation with the @Component annotation:
package com.microservices.chapter3import org.springframework.stereotype.Componentimport java.util.concurrent.ConcurrentHashMap@Component ...
Read now
Unlock full access