基本信息
源码名称:Packt.Hands-On.Cloud-Native.Applications.with.Java.and.Quarkus.pdf
源码大小:4.81M
文件格式:.pdf
开发语言:Java
更新时间:2020-08-15
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
Table of Contents Preface 1 Section 1: Section 1: Getting Started with Quarkus Chapter 1: Introduction to Quarkus Core Concepts 8 Technical requirements 9 From the big data hype to Kubernetes 9 The Kubernetes architecture in a nutshell 10 Benefits of using Kubernetes 12 From Java EE to MicroProfile 12 The Twelve-Factor App methodology 15 The MicroProfile initiative 16 Quarkus – a Kubernetes-native Java framework 18 Native code execution 18 Container first 19 Unifying the imperative and Reactive Programming models 20 Coding that sparks joy 20 Best-of-breed Java libraries and standards 21 Quarkus architecture 21 Getting started with GraalVM 23 Installing GraalVM 24 Running a Java application with GraalVM 26 Building native images 27 Installing a development environment 28 A brief overview of IntelliJ IDEA 29 Installing IntelliJ Plugin for Quarkus 30 Summary 32 Chapter 2: Developing Your First Application with Quarkus 33 Technical requirements 33 Getting started with the Quarkus Maven plugin 34 Launching the Quarkus Maven plugin 35 Running the application 40 Using the Maven plugin to generate a Gradle project 41 Kick-starting applications using the Quarkus online application 42 Testing live reload from your IDE 44 Debugging applications 46 Testing Quarkus applications 49 Choosing a different port for testing 52 Turning your application into a native executable 53 Table of Contents [ ii ] Executing integration tests against the native executable 55 Summary 57 Chapter 3: Creating a Container Image of Your Application 58 Technical requirements 58 Setting up Docker 59 Running Quarkus applications in a container 61 Running the native executable process in a container 66 Deploying Quarkus applications on a Kubernetes-native platform 68 Installing Minishift 70 Building and deploying a Quarkus application on OKD 73 Scaling our Quarkus service 80 Summary 83 Section 2: Section 2: Building Applications with Quarkus Chapter 4: Adding Web Interfaces to Quarkus Services 85 Technical requirements 85 Adding web content to Quarkus applications 86 Building a CRUD application 86 Adding a UI to our customer service 90 Testing our application 94 Running the example 96 Running our application on Minishift 97 Configuring Cross-Origin Resource Sharing in Quarkus 99 Adding Enterprise web components 100 Introducing WebSockets 101 Building a project that uses Websockets 102 Creating a WebSocket client project 104 Adding an AJAX handler 107 Summary 109 Chapter 5: Managing Data Persistence with Quarkus 110 Technical requirements 110 Adding an ORM layer to our applications 111 Defining the entity layer 112 Coding the repository classes 115 Defining REST endpoints 118 Connecting to the database 119 Coding a test class 120 Adding a web interface to our application 122 Running the application 126 Caching entity data 127 Taking an application to the cloud 129 Making data persistence easier using Panache API 132 Summary 136 Table of Contents [ iii ] Chapter 6: Building Applications Using the MicroProfile API 137 Technical requirements 137 Getting started with the MicroProfile API 138 Getting started with MicroProfile projects 139 The Eclipse MicroProfile Health Check 140 Using liveness and readiness checks 143 Letting OpenShift manage unhealthy services 145 The Eclipse MicroProfile Fault Tolerance API 151 Using Timeout, Fallback, and Retry to create resilient services 152 Applying a retry policy to your failures 153 Circuit Breaker 154 Using asynchronous and bulkhead policies 155 The Eclipse MicroProfile Metrics API 156 Configuring OpenAPI and the Swagger UI 158 Customizing the output of OpenAPI 162 The Eclipse MicroProfile OpenTracing API 164 The Eclipse MicroProfile REST Client API 167 Summary 172 Chapter 7: Securing Applications 173 Technical requirements 173 Securing our customer service 174 Securing Quarkus services with Elytron 175 Creating a test class that performs basic authentication 178 Securing Quarkus services with Keycloak 180 Adding a Keycloak extension to our service 181 Setting up Keycloak 181 Defining the security realm 182 Configuring Quarkus for Keycloak 188 Coding the test class 189 Gathering principal and role information at runtime 193 Securing Quarkus services with MicroProfile JWT 194 Configuring our service to use JWT 197 Running our test 198 Injecting JWT claims and token information 199 Using HTTPS with Quarkus 200 Summary 201 Section 3: Section 3: Advanced Development Tactics Chapter 8: Advanced Application Development 203 Technical requirements 203 Using advanced configuration options 203 Multiple configuration sources 205 Configuring custom configuration sources 205 Table of Contents [ iv ] Using converters in your configuration 208 Adding custom converters 211 Testing advanced configuration options 212 Configuration profiles 213 Activating profiles 214 Automatic profile selection 215 Controlling the application life cycle 216 Activating a database test resource 218 Firing events with the Quarkus scheduler 219 Using the cron scheduler format 221 Firing one-time events 221 Summary 222 Chapter 9: Unifying Imperative and Reactive with Vert.x 223 Technical requirements 223 Demystifying Reactive Programming and Vert.x 224 Vert.x API models in Quarkus 226 Managing the Vert.x core API 227 Managing Vert.x API for RxJava 233 Using RxJava with Quarkus 235 Decoupling events with Vert.x axle libraries 239 Adding an EventBus layer to Quarkus applications 240 Rolling up the application 242 Streaming SSE with Vert.x 242 Canceling events 245 Managing the Reactive SQL Client 246 Configuring your application to use the PostgreSQL reactive client 246 Running the example 249 Summary 251 Chapter 10: Reactive Messaging with Quarkus 252 Technical requirements 252 Getting started with Reactive Messaging 253 Streaming messages with Apache Kafka 255 Composing our stock trading application 255 Coding bean classes 257 Streaming messages to Kafka in the cloud 264 Installing Kafka on OpenShift 264 Shaping up our project for native cloud execution 269 Streaming messages with AMQP 272 Configuring the AMQP broker 273 Streaming messages to AMQ in the cloud 276 Summary 280 Other Books You May Enjoy 281 Index 284