售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Title Page
Copyright and Credits
Hands-On Microservices with Kotlin
Dedication
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the author
About the reviewers
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Understanding Microservices
What is a microservice?
Understanding SoA
Differentiating microservices from SoA
From the monolith to microservices
Microservices principles
Defining design principles
Modelled around business capabilities
Loosely couple
Single responsibility
Hiding implementation
Isolation
Independently deployable
Build for failure
Upstream
Downstream
Logging
Monitoring
Alerting
Recovery
Fallbacks
Scalability
Automation
Domain-Driven Design
What is Domain-Driven Design
Ubiquitous language
Bounded context
Context mapping
Using DDD in microservices
Reactive microservices
Reactive programming
Reactive Manifesto
Responsive
Resilient
Elastic
Message-driven
Back pressure
Reactive frameworks
Reactive Extensions
Project Reactor
Java reactive streams
Akka
Reactive microservices
Cloud Native microservices
Cloud computing
Containers
Deployment models
Private cloud
Public cloud
Hybrid cloud
Service models
Infrastructure as a Service
Platform as a Service
Software as a Service
Cloud Native microservices
Summary
Getting Started with Spring Boot 2.0
Creating a Spring Boot application
Setting up
Installing JDK 8
UNIX/Mac OS X
Windows
Testing the installation
Installing Maven 3.5
Unix /MacOS X
Windows
Testing the installation
Installing IntelliJ IDEA CE 2017.2
Using Spring Initializr
Understanding basic usage
Reviewing the generated project files
Maven Files
Source files
Resource files
Gitignore
Understanding advanced usage
Using Maven
Life cycle phases
Introduction to Maven goals
Understanding the POM file
Project definition
Maven parent
Project properties
Dependencies
Build
Repositories
Using IntelliJ IDEA
Opening our Maven project
Executing life cycle phases and goals
Modifying our microservice
Debugging
Tips and Tricks
Spring Boot application structure
Creating an application object
Defining Spring application context
Understanding the component scan
Using components
Autowiring
Packaging and running a Spring Boot application
Packaging
Making JARs not WARs
Running Spring Boot applications
Creating executable JARs
Configuring our application
Setting configuration values
Using properties
Using Yaml
Using command-line arguments
Understanding Spring Expression Language
Using profiles
Defining profile values
Executing with profiles
Creating conditional beans
Creating beans explicitly
Defining an additional bean
Defining beans with conditionals
Running different configurations
Summary
Creating RESTful Services
Understanding RestController
What is a controller
Creating a RestController
Understanding our controller
Path and request parameters
Creating a map of customers
Getting path variables
Understanding path variables
Defining request parameters
Understanding request parameters
HTTP verbs and statuses
Standard HTTP verbs and statuses
Single resources
Collections
Generic errors
Handling HTTP verbs
Handling HTTP POST
Handling HTTP DELETE
Handling HTTP PUT
Using verb and mapping annotations
Implementing a service layer
Creating a service interface
Creating an implementation
Binding the right bean
Using the service
Handling HTTP statuses
Using ResponseEntity
Answering a GET request
Answering a POST request
Answering a DELETE request
Answering an UPDATE request
Empty responses
Working with JSON
Understanding serialization
Using simple objects
Working with complex objects
Adding telephones to our customers
Handling null values
Understanding deserialization
From a request into an object
Deserializing complex objects
Validating objects
Handling errors
Using controller advice
Creating business exceptions
Avoiding the controller advice
Summary
Creating Reactive Microservices
Understanding Spring WebFlux
Creating a Spring WebFlux application
Using Netty
Serving static context
Adding a RestController
Creating a customer service
Blocking is not reactive
Creating reactive services
Understanding subscribers and publishers
Publishing a single object
Using Mono in a service
Publishing multiple objects
Using Flux in a service
Receiving objects reactively
Using functional web programming
Using RouterFunction
Creating handlers
Using reactive services
Handling multiple routes
Using query parameters
Processing a JSON body
Handling reactive errors
Capturing errors on Handlers
Publishing errors
Summary
Reactive Spring Data
NoSQL databases
What is a SQL database?
What is a NoSQL database?
Installing MongoDB
Starting our database server
Connecting with the Mongo client
Creating a database
Using commands
Using Spring Data
Setting up the project
Configuring our connection
Sending commands to MongoDB
Reactive repositories
Creating a repository
Using the repository
Completing our initialization
Using ReactiveMongoTemplate
From CRUD to REST
Bringing back our service
Mapping GET to READ
Mapping POST to CREATE
Mapping DELETE
Finding Customers
Summary
Creating Cloud-Native Microservices
Understanding Spring Cloud
What is a Cloud-Native application?
Spring Cloud architecture
Configuration server
Service discovery
Load Balancer
Gateway
Circuit breaker
Spring Cloud Netflix
Creating a Spring Cloud microservice
Configuration Server
Creating a Configuration Server
Getting configurations
Ciphering data
Using application profiles
Service discovery
Creating a Service Discovery Server
Connecting to the Discovery Server
Using Spring Boot actuator
Gateway
Creating a Gateway
Defining routes
Summary
Creating Dockers
Starting with Docker
Understanding containers
Virtual machines
Containers
Docker
Installing Docker
Starting with Docker
Pulling images
Managing images
Building Dockers with microservices
Creating an example microservice
Creating a Dockerfile
Dockerize our microservice
Running the microservice
Publishing Dockers
Understanding repositories
Creating an account on Docker Hub
Publishing a Docker
Integrating Docker with Maven
Summary
Scaling Microservices
A scalable architecture
Scaling directions
Vertical scaling
Horizontal scaling
Design for scaling
Independently scaling
Scaling down
Creating a Cloud
Creating a swarm
Adding a service
Getting logs from a service
Deleting a service
Publishing a microservice as a service
Creating a registry
Creating a microservice
Creating our Docker
Creating the service
Controlling services
Scaling instances
Getting logs from a service
Controlling the service
Summary
Testing Spring Microservices
Understanding SpringBootTest
Creating a simple microservice
Understanding SpringBootTest
Testing beans
Using MockMvc
Mocking beans
Why we mock
Setting up a mock
Returning mocked values
Verifying Mock invocation
Fluent tests
Adding Kluent
Testing our services expressively
Testing our controller expressively
Summary
Monitoring Microservices
Understanding monitoring
What is monitoring?
Alerting
Recovering
Building a failing microservice
SpringBoot Actuator
Enabling SpringBoot Actuator
Understanding Actuator's endpoints
Health endpoint
Metrics endpoint
Trace endpoint
Defining health indicators
Protecting Actuator endpoints
Java Managing Extensions
Understanding JMX
Using JMX
Create management beans
Summary
Deploying Microservices
Setting things up
Creating a GitHub account
Installing Git
Create an OpenShift account
Downloading the OpenShift client
Building our application
Creating an example microservice
Adding tests
Uploading to GitHub
Publishing to OpenShift
Creating an application
Managing our application
Updating the application
Summary
Best Practices
Using Kotlin idioms
Inferred types
Expressions
Default parameters
Lambda
Managing the Spring context
Constructor injection
Explicit context configuration
Decouple services
Layering the application
Understanding our classes
Domains
Splitting
Testing effectively
Understanding type of tests
Unit tests
Integration tests
E2E tests
Other tests
Testing pyramid
Test Driven Development
Behavior-Driven Development
Handling CI and CD
Continuous Integration
Continuous Delivery
Pipeline
Dashboard
Summary
Other Books You May Enjoy
Leave a review - let other readers know what you think
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜