Skip to content

It is a spring rest micro-service which exposed few endpoint. 'book-catalog-service' is a consumer of this service

License

Notifications You must be signed in to change notification settings

singhmahabir/book-info-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

book-info-service

book-info-service

  • input -> bookId
  • output -> book details for bookId

the below url has exposed

data.sql which is available in src/main/resources will exucuted at the time of deployment.

Here name must be same as data.sql

insert into BOOK_ENTITY
values(1,'Kathy Sierra, Jonathan','1234','Head First is a series of introductory instructional books to many topics',
'2009-06-15', 'Head First');

insert into BOOK_ENTITY
values(2,'Chetan Bhagat','2345','Half Girlfriend is an Indian English coming of age, young adult romance novel by 
Indian author Chetan Bhagat','2014-10-15', 'Half Girlfriend');
{
    "book": [
        {
            "bookId": "1234",
            "name": "Head First",
            "desc": "Head First is a series of introductory instructional books to many topics",
            "author": "Kathy Sierra, Jonathan",
            "launchedDate": "2009-06-15"
        },
        {
            "bookId": "2345",
            "name": "Half Girlfriend",
            "desc": "Half Girlfriend is an Indian English coming of age, young adult romance novel by \nIndian author Chetan Bhagat",
            "author": "Chetan Bhagat",
            "launchedDate": "2014-10-15"
        }
    ]
}

zipkin client

custom sample of zipkin

import org.springframework.cloud.sleuth.Sampler;
import org.springframework.cloud.sleuth.Span;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class CustomSampler {
    @Bean
    public Sampler smartSampler() {
        return new Sampler() {
            @Override
            public boolean isSampled(Span span) {
                System.out.println("custom sampler used!");
                return true;
            }
        };
    }
}

About

It is a spring rest micro-service which exposed few endpoint. 'book-catalog-service' is a consumer of this service

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published