舉報

會員
Spring 5.0 By Example
Ifyou’readeveloperstartingoutwithSpring,thenthisbookwillhelpyoulearnaboutthenewSpring5.0frameworkconceptsfollowedbytheirimplementationinJavaandKotlin.ThebookwillalsohelpexperiencedSpringdevelopersgaininsightsintothenewfeaturesaddedinSpring5.0.
最新章節
- Leave a review - let other readers know what you think
- Other Books You May Enjoy
- Summary
- Running the system
- Dockerizing the microservices
- Collection commands statistics with Hystrix
品牌:中圖公司
上架時間:2021-06-24 18:03:22
出版社:Packt Publishing
本書數字版權由中圖公司提供,并由其授權上海閱文信息技術有限公司制作發行
- Leave a review - let other readers know what you think 更新時間:2021-06-24 19:18:27
- Other Books You May Enjoy
- Summary
- Running the system
- Dockerizing the microservices
- Collection commands statistics with Hystrix
- Collecting metrics with Zipkin
- Monitoring the microservices
- Creating the JwtTokenStore Bean
- Configuring the application.yaml file
- Adding the security dependency
- Protecting the microservices with OAuth 2.0
- Implicit grant flow
- Client credentials flow
- Testing the Auth microservice
- Configuring the security
- Creating the Auth microservice
- Creating the Authentication microservice
- Running the Mail microservice
- Creating the RabbitMQ queue listener
- The MailSender class
- Modeling a Mail message
- Configuring some RabbitMQ stuff
- Adding RabbitMQ dependencies
- Creating the Mail microservice project
- Creating the SendGrid account
- Creating the Mail microservice
- Hystrix Dashboard
- Creating the Turbine server microservice
- Learning about the Turbine server
- The airline Payments microservice
- The airline Bookings microservice
- Putting It All Together
- Summary
- Creating the EDGE server
- Understanding the EDGE service project
- Spring Cloud Zuul
- Running Spring Boot Admin
- Spring Boot Admin
- Spring Cloud Hystrix
- Hystrix in a nutshell
- When the services fail hello Hystrix
- Service discovery and load balancing in practice
- Understanding the discovery client
- Netflix Ribbon
- Cloning the Flight microservice project
- Flights microservice
- Running the plane microservice
- The REST layer
- Creating the Plane service
- The reactive repository
- Coding the planes microservice
- Creating the planes microservice
- Understanding the service discovery power
- Circuit Breakers and Security
- Summary
- Putting the infrastructure on Docker
- Creating our first route with Spring Cloud Gateway
- Checking the Eureka server
- Running the Spring Cloud Gateway
- Configuring the Spring Cloud Gateway project
- Creating the Spring Cloud Gateway main class
- Creating the Spring Cloud Gateway project
- Spring Cloud Gateway
- Running the Zipkin server
- Configuring boostrap.yaml and application.yaml
- Creating the Spring Cloud Zipkin server
- Infrastructure for the Zipkin server
- Spring Cloud Zipkin server and Sleuth
- Running the Spring Cloud Eureka server
- Configuring the Spring Cloud Eureka server
- Creating the Eureka server main class
- Creating Spring Cloud Eureka
- Spring Cloud service discovery
- Testing our Config Server
- Running the Config Server
- Configuring the Git repository as a properties source
- Configuring the Spring Boot application
- Using GitHub as a repository
- Enabling Spring Cloud Config Server
- Creating the Config Server project
- Spring Cloud Config Server
- Solution diagram
- Airline functionalities
- The Airline Ticket System
- Airline Ticket System
- Summary
- Testing the network
- Running the solution
- Creating a docker-compose file
- Installing docker-compose
- The docker-compose tool
- Running the Tweet Dispatcher container
- Running the Tweet Gathering container
- Running the Tracked Hashtag Service container
- Running the containerized solution
- Tweet Dispatcher
- Tweet Gathering
- Dockerizing the whole solution
- Filtering streams
- Consuming the RabbitMQ queues reactively
- Configuring RabbitMQ Reactor beans
- Understanding the Reactor RabbitMQ
- Reactor RabbitMQ
- Server-Sent Events
- WebSockets
- HTTP and persistent connections
- A few words about the HTTP protocol
- Server-Sent Events
- Additional dependencies
- Using Spring Initializr once again
- Creating the Tweet Dispatcher project
- Playing with Server-Sent Events
- Summary
- Testing endpoints
- Application custom information
- Actuator Endpoints
- Adding Spring Boot Actuator in our pom.xml
- Spring Actuator
- Testing stuff
- Running the Twitter Gathering
- Running Tracked Hashtag Service
- Testing the microservices' integrations
- Sending the messages to the broker
- Creating exchanges queues and bindings for the Twitter Hashtag Service
- Configuring the RabbitMQ connections
- Adding the Spring Starter RabbitMQ dependency
- Changing the Tracked Hashtag Service
- Listening to the Rabbit Queue and consuming the Twitter API
- Creating the gather service
- Some words about server-sent events (SSE)
- Authentication with Twitter APIs
- Creating the models to gather Tweets
- Producing WebClient in a Spring Way
- Spring reactive web clients
- Declaring Twitter credentials for the Spring container
- TwitterAppSettings
- Twittertoken
- Modelling objects to represent Twitter settings
- Configuring Twitter credentials in application.yaml
- Producing Twitter credentials
- Enabling Twitter in our application
- Producing messages with Spring Messaging
- Consuming messages with Spring Messaging
- Declaring Spring beans for RabbitMQ
- Declaring exchanges queues and bindings in yaml
- Configuring exchanges queues and bindings on Spring AMQP
- Bindings
- Queues
- Header exchanges
- Topic exchanges
- Fanout exchanges
- Direct exchanges
- Exchanges
- Understanding RabbitMQ exchanges queues and bindings
- Integrating Spring Application and RabbitMQ
- Adding Spring AMQP in our pom.xml
- Spring Messaging AMQP
- Starting the RabbitMQ server
- Pulling the RabbitMQ image from Docker Hub
- Starting the RabbitMQ server with Docker
- Project structure
- Creating the Twitter Gathering project
- Reactive Web Clients
- Summary
- Testing APIs
- Running the container
- Creating the image
- Configuring pom.xml
- Creating a Twitter application
- Exposing the REST resources
- Creating the service layer
- Creating Tracked Hashtag repository
- Providing a ReactiveRedisTemplate
- Configuring the ReactiveRedisConnectionFactory
- Spring Data Reactive Redis
- Main commands
- Sets
- Main commands
- Lists
- Main commands
- Strings
- Data types
- Understanding Redis
- Configuring the redis-cli tool
- Running the Redis instance
- Pulling the Redis image from the Docker Hub
- Creating a Docker network for our application
- Looking for the Maven plugins for Kotlin
- Adding Jackson for Kotlin
- Creating the project with Spring Initializr
- Project use case
- Creating the project
- Wrapping it up
- Elvis operator
- Safe calls
- Null safety
- Step case
- The downTo case
- The until case
- Simple case
- Range expressions
- Smart Casts
- String interpolation
- Kotlin idioms
- Companion objects
- Objects
- Data classes
- Overriding a function
- Single expressions functions
- Simple function without return
- Simple function with parameters and return type
- Declaring functions in Kotlin
- Semantics
- Syntax
- Main characteristics of Kotlin
- Learning Kotlin basics
- Kotlin Basics and Spring Data Redis
- Summary
- Changing the CategoryResource
- Adding the Spring WebFlux dependency
- Changing the REST layer
- Changing the CategoryService
- Fixing the service layer
- Creating the first Reactive repository
- Reactive repositories in practice
- Spring Data Reactive
- Spring Data for Reactive Extensions
- Event-loop model
- Spring WebFlux
- Let's play with the Reactor
- Reactive types
- Hot and cold
- Components
- Project Reactor
- Reactive Spring
- Putting in Reactive fashion
- Running the Dockerized CMS
- Configuring the Docker Spring profile
- Pushing the image to Docker Hub
- Adding the plugin on pom.xml
- Configuring the docker-maven-plugin
- Creating the Docker image for CMS
- Checking the persistence
- Adding the repository layer
- Configuring the database connection
- Mapping the domain model
- Removing the PostgreSQL and Spring Data JPA dependencies
- Spring Data MongoDB
- Creating the final data access layer
- Checking the data on the database structure
- Installing and configuring pgAdmin3
- Configuring transactions
- Adding the JPA repositories in the CMS application
- Mapping the models
- Configuring the Postgres connections
- Configuring pom.xml for Spring Data JPA
- Spring Data JPA
- Spring Data project
- Preparing a PostgreSQL database
- Preparing MongoDB
- Learning the basics of Docker
- Persistence with Spring Data and Reactive Fashion
- Summary
- Creating the Category Service
- Creating the Category Controller
- Creating the application entry point
- Services
- Controllers
- AngularJS concepts
- Integrate with AngularJS
- First documented API
- Configuring Swagger
- Adding dependencies to pom.xml
- Configuring Swagger for our APIs
- NewsService
- UserService
- CategoryService
- Before starting the service layer
- Keeping the news safely
- Adding a new review
- Changes in the model
- Adding service layer
- NewsResource
- UserResource
- Creating the CategoryResource class
- Hello REST resources
- News
- User
- Category
- Tag
- Creating the models
- Adding Lombok dependency
- Models
- Creating the REST resources
- Command line via the JAR file
- Command line via the Maven goal
- Command line
- IntelliJ IDEA
- Running the application
- Looking under the hood
- Running the application
- Generating the project
- The dependencies section
- Project metadata section
- The CMS project
- Creating the CMS application structure
- Starting in the Spring World – the CMS Application
- Summary
- Docker volume
- Docker network
- Docker container
- Docker run
- Docker commands
- Docker volumes
- Docker networks
- Containers
- Docker images
- Introducing Docker concepts
- Installing Docker
- Spring Tools Suite
- IntelliJ IDEA
- Installing IDE
- Installing Maven
- Installing OpenJDK
- Setting up our development environment
- Microservices and Spring Boot
- Spring Boot
- Spring Integration
- Spring Cloud Stream
- Spring Cloud Bus
- Spring Cloud Security
- Spring Cloud Consul
- Spring Cloud Config
- Spring Cloud Netflix
- Spring Cloud
- Spring Security
- Spring Data
- Spring WebFlux
- Spring Web MVC
- Spring JMS
- Spring for Apache Kafka
- Spring AMQP
- Spring Messaging
- Core container
- Spring Core Framework
- Spring modularity
- Journey to the Spring World
- Reviews
- Get in touch
- Conventions used
- Download the color images
- Download the example code files
- To get the most out of this book
- What this book covers
- Who this book is for
- Preface
- Packt is searching for authors like you
- About the reviewer
- About the author
- Contributors
- PacktPub.com
- Why subscribe?
- Packt Upsell
- Dedication
- Title Page
- coverpage
- coverpage
- Title Page
- Dedication
- Packt Upsell
- Why subscribe?
- PacktPub.com
- Contributors
- About the author
- About the reviewer
- 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
- Journey to the Spring World
- Spring modularity
- Spring Core Framework
- Core container
- Spring Messaging
- Spring AMQP
- Spring for Apache Kafka
- Spring JMS
- Spring Web MVC
- Spring WebFlux
- Spring Data
- Spring Security
- Spring Cloud
- Spring Cloud Netflix
- Spring Cloud Config
- Spring Cloud Consul
- Spring Cloud Security
- Spring Cloud Bus
- Spring Cloud Stream
- Spring Integration
- Spring Boot
- Microservices and Spring Boot
- Setting up our development environment
- Installing OpenJDK
- Installing Maven
- Installing IDE
- IntelliJ IDEA
- Spring Tools Suite
- Installing Docker
- Introducing Docker concepts
- Docker images
- Containers
- Docker networks
- Docker volumes
- Docker commands
- Docker run
- Docker container
- Docker network
- Docker volume
- Summary
- Starting in the Spring World – the CMS Application
- Creating the CMS application structure
- The CMS project
- Project metadata section
- The dependencies section
- Generating the project
- Running the application
- Looking under the hood
- Running the application
- IntelliJ IDEA
- Command line
- Command line via the Maven goal
- Command line via the JAR file
- Creating the REST resources
- Models
- Adding Lombok dependency
- Creating the models
- Tag
- Category
- User
- News
- Hello REST resources
- Creating the CategoryResource class
- UserResource
- NewsResource
- Adding service layer
- Changes in the model
- Adding a new review
- Keeping the news safely
- Before starting the service layer
- CategoryService
- UserService
- NewsService
- Configuring Swagger for our APIs
- Adding dependencies to pom.xml
- Configuring Swagger
- First documented API
- Integrate with AngularJS
- AngularJS concepts
- Controllers
- Services
- Creating the application entry point
- Creating the Category Controller
- Creating the Category Service
- Summary
- Persistence with Spring Data and Reactive Fashion
- Learning the basics of Docker
- Preparing MongoDB
- Preparing a PostgreSQL database
- Spring Data project
- Spring Data JPA
- Configuring pom.xml for Spring Data JPA
- Configuring the Postgres connections
- Mapping the models
- Adding the JPA repositories in the CMS application
- Configuring transactions
- Installing and configuring pgAdmin3
- Checking the data on the database structure
- Creating the final data access layer
- Spring Data MongoDB
- Removing the PostgreSQL and Spring Data JPA dependencies
- Mapping the domain model
- Configuring the database connection
- Adding the repository layer
- Checking the persistence
- Creating the Docker image for CMS
- Configuring the docker-maven-plugin
- Adding the plugin on pom.xml
- Pushing the image to Docker Hub
- Configuring the Docker Spring profile
- Running the Dockerized CMS
- Putting in Reactive fashion
- Reactive Spring
- Project Reactor
- Components
- Hot and cold
- Reactive types
- Let's play with the Reactor
- Spring WebFlux
- Event-loop model
- Spring Data for Reactive Extensions
- Spring Data Reactive
- Reactive repositories in practice
- Creating the first Reactive repository
- Fixing the service layer
- Changing the CategoryService
- Changing the REST layer
- Adding the Spring WebFlux dependency
- Changing the CategoryResource
- Summary
- Kotlin Basics and Spring Data Redis
- Learning Kotlin basics
- Main characteristics of Kotlin
- Syntax
- Semantics
- Declaring functions in Kotlin
- Simple function with parameters and return type
- Simple function without return
- Single expressions functions
- Overriding a function
- Data classes
- Objects
- Companion objects
- Kotlin idioms
- String interpolation
- Smart Casts
- Range expressions
- Simple case
- The until case
- The downTo case
- Step case
- Null safety
- Safe calls
- Elvis operator
- Wrapping it up
- Creating the project
- Project use case
- Creating the project with Spring Initializr
- Adding Jackson for Kotlin
- Looking for the Maven plugins for Kotlin
- Creating a Docker network for our application
- Pulling the Redis image from the Docker Hub
- Running the Redis instance
- Configuring the redis-cli tool
- Understanding Redis
- Data types
- Strings
- Main commands
- Lists
- Main commands
- Sets
- Main commands
- Spring Data Reactive Redis
- Configuring the ReactiveRedisConnectionFactory
- Providing a ReactiveRedisTemplate
- Creating Tracked Hashtag repository
- Creating the service layer
- Exposing the REST resources
- Creating a Twitter application
- Configuring pom.xml
- Creating the image
- Running the container
- Testing APIs
- Summary
- Reactive Web Clients
- Creating the Twitter Gathering project
- Project structure
- Starting the RabbitMQ server with Docker
- Pulling the RabbitMQ image from Docker Hub
- Starting the RabbitMQ server
- Spring Messaging AMQP
- Adding Spring AMQP in our pom.xml
- Integrating Spring Application and RabbitMQ
- Understanding RabbitMQ exchanges queues and bindings
- Exchanges
- Direct exchanges
- Fanout exchanges
- Topic exchanges
- Header exchanges
- Queues
- Bindings
- Configuring exchanges queues and bindings on Spring AMQP
- Declaring exchanges queues and bindings in yaml
- Declaring Spring beans for RabbitMQ
- Consuming messages with Spring Messaging
- Producing messages with Spring Messaging
- Enabling Twitter in our application
- Producing Twitter credentials
- Configuring Twitter credentials in application.yaml
- Modelling objects to represent Twitter settings
- Twittertoken
- TwitterAppSettings
- Declaring Twitter credentials for the Spring container
- Spring reactive web clients
- Producing WebClient in a Spring Way
- Creating the models to gather Tweets
- Authentication with Twitter APIs
- Some words about server-sent events (SSE)
- Creating the gather service
- Listening to the Rabbit Queue and consuming the Twitter API
- Changing the Tracked Hashtag Service
- Adding the Spring Starter RabbitMQ dependency
- Configuring the RabbitMQ connections
- Creating exchanges queues and bindings for the Twitter Hashtag Service
- Sending the messages to the broker
- Testing the microservices' integrations
- Running Tracked Hashtag Service
- Running the Twitter Gathering
- Testing stuff
- Spring Actuator
- Adding Spring Boot Actuator in our pom.xml
- Actuator Endpoints
- Application custom information
- Testing endpoints
- Summary
- Playing with Server-Sent Events
- Creating the Tweet Dispatcher project
- Using Spring Initializr once again
- Additional dependencies
- Server-Sent Events
- A few words about the HTTP protocol
- HTTP and persistent connections
- WebSockets
- Server-Sent Events
- Reactor RabbitMQ
- Understanding the Reactor RabbitMQ
- Configuring RabbitMQ Reactor beans
- Consuming the RabbitMQ queues reactively
- Filtering streams
- Dockerizing the whole solution
- Tweet Gathering
- Tweet Dispatcher
- Running the containerized solution
- Running the Tracked Hashtag Service container
- Running the Tweet Gathering container
- Running the Tweet Dispatcher container
- The docker-compose tool
- Installing docker-compose
- Creating a docker-compose file
- Running the solution
- Testing the network
- Summary
- Airline Ticket System
- The Airline Ticket System
- Airline functionalities
- Solution diagram
- Spring Cloud Config Server
- Creating the Config Server project
- Enabling Spring Cloud Config Server
- Using GitHub as a repository
- Configuring the Spring Boot application
- Configuring the Git repository as a properties source
- Running the Config Server
- Testing our Config Server
- Spring Cloud service discovery
- Creating Spring Cloud Eureka
- Creating the Eureka server main class
- Configuring the Spring Cloud Eureka server
- Running the Spring Cloud Eureka server
- Spring Cloud Zipkin server and Sleuth
- Infrastructure for the Zipkin server
- Creating the Spring Cloud Zipkin server
- Configuring boostrap.yaml and application.yaml
- Running the Zipkin server
- Spring Cloud Gateway
- Creating the Spring Cloud Gateway project
- Creating the Spring Cloud Gateway main class
- Configuring the Spring Cloud Gateway project
- Running the Spring Cloud Gateway
- Checking the Eureka server
- Creating our first route with Spring Cloud Gateway
- Putting the infrastructure on Docker
- Summary
- Circuit Breakers and Security
- Understanding the service discovery power
- Creating the planes microservice
- Coding the planes microservice
- The reactive repository
- Creating the Plane service
- The REST layer
- Running the plane microservice
- Flights microservice
- Cloning the Flight microservice project
- Netflix Ribbon
- Understanding the discovery client
- Service discovery and load balancing in practice
- When the services fail hello Hystrix
- Hystrix in a nutshell
- Spring Cloud Hystrix
- Spring Boot Admin
- Running Spring Boot Admin
- Spring Cloud Zuul
- Understanding the EDGE service project
- Creating the EDGE server
- Summary
- Putting It All Together
- The airline Bookings microservice
- The airline Payments microservice
- Learning about the Turbine server
- Creating the Turbine server microservice
- Hystrix Dashboard
- Creating the Mail microservice
- Creating the SendGrid account
- Creating the Mail microservice project
- Adding RabbitMQ dependencies
- Configuring some RabbitMQ stuff
- Modeling a Mail message
- The MailSender class
- Creating the RabbitMQ queue listener
- Running the Mail microservice
- Creating the Authentication microservice
- Creating the Auth microservice
- Configuring the security
- Testing the Auth microservice
- Client credentials flow
- Implicit grant flow
- Protecting the microservices with OAuth 2.0
- Adding the security dependency
- Configuring the application.yaml file
- Creating the JwtTokenStore Bean
- Monitoring the microservices
- Collecting metrics with Zipkin
- Collection commands statistics with Hystrix
- Dockerizing the microservices
- Running the system
- Summary
- Other Books You May Enjoy
- Leave a review - let other readers know what you think 更新時間:2021-06-24 19:18:27