The Useful HTTP Client Library OkHttp

The Useful HTTP Client Library OkHttp

OkHttp In Spring Boot development, calling third-party HTTP interfaces is a very common requirement, such as calling microservices or accessing external APIs. Although Spring Boot provides HTTP calling tools like RestTemplate and WebClient, sometimes we may need a lower-level, more flexible, and higher-performance HTTP client library, and OkHttp is a relatively mature solution. Why Choose … Read more

How to Elegantly Implement HTTP Logging?

How to Elegantly Implement HTTP Logging?

Click the blue text to follow us Recently, I encountered a requirement to implement HTTP logging myself. Adhering to the principle of not reinventing the wheel, I first consulted AI and found a framework called logbook. As an HTTP logging framework, logbook can fully capture the headers, parameters, and body of requests and responses. This … Read more

Encrypting Database Connection Information and YAML Configuration Properties in Spring Boot Using the SM4 National Encryption Algorithm (Automatic Decryption on Read)

Encrypting Database Connection Information and YAML Configuration Properties in Spring Boot Using the SM4 National Encryption Algorithm (Automatic Decryption on Read)

Click on the “Business Card” above to follow our public account You can obtain programming materials from the menu bar Hello, I am Coder-Wen Xiaobai,a post-95 Java backend developer. 1. Introduction In the process of developing business systems, we inevitably use databases. During application development, database connection information is often configured in plain text in … Read more

Seven Methods for Implementing HTTP Calls in Spring Boot

Seven Methods for Implementing HTTP Calls in Spring Boot

Hello everyone, I am Xia Yi. Today I will share about HTTP calling methods. Most projects are currently using the Spring Boot framework, and HTTP calls are an inevitable part of daily development. Whether calling third-party APIs or implementing communication between microservices, HTTP requests play a crucial role. This article will introduce seven efficient and … Read more

Comparison and Analysis of SPI Mechanism and Spring Boot AutoConfiguration

Comparison and Analysis of SPI Mechanism and Spring Boot AutoConfiguration

1. Revolutionary Improvement in Architecture Efficiency 1.1 Significant Increase in Class Loading Efficiency Spring Boot 2.7 introduces <span>AutoConfiguration.imports</span> which adopts manifest-based configuration loading, compared to the traditional SPI mechanism: Traditional SPI scan path: META-INF/services/** Spring Boot new solution: META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports By using precise configuration manifest indexing, it reduces classpath scanning operations by 90%. Actual data shows … Read more

Goodbye HttpClient! Goodbye OkHttp!

Goodbye HttpClient! Goodbye OkHttp!

Java interview and written exam experience, learn a bit of Java technology every day Public account Java interview Follow me to avoid getting lost Author: Bo Saidong Source: https://www.cnblogs.com/bryan31/ Background Due to business needs, I have to integrate with many different third-party companies. These service providers all offer HTTP-based APIs. However, the specific details of … Read more

Why Convert Files to Base64 for Upload?

Why Convert Files to Base64 for Upload?

1 Introduction Recently, I encountered a situation in development where file uploads were done using Base64 encoding. I remember when I first learned about HTTP file uploads, they were done by directly uploading binary files with a content-type of multipart/form-data. We know that all transmissions over the network ultimately transmit binary streams, so there is … Read more

Principle of SD Card Ejection Mechanism

Principle of SD Card Ejection Mechanism

SD cards are familiar to everyone; we have all seen and used them. When inserted, they automatically lock in place, and with another press, they pop out. But what structural principle enables this function? γ€€γ€€ γ€€γ€€The card slot mechanism commonly used in mobile devices is simple yet classic. This mechanism is a classic application of … Read more

OpenFeign: The HTTP Client Bard!

OpenFeign: The HTTP Client Bard!

OpenFeign: The HTTP Client Bard! Introduction Friends, Niu Ge recently took on a project that requires front-end and back-end separation, using HTTP for communication between microservices. At first glance, there seems to be no problem: we just need to write an HttpClient and add some RestTemplate, right? But once I dived in, I found that … Read more

Quick Connection of Wumei IoT Using MQTT.fx Tool

Quick Connection of Wumei IoT Using MQTT.fx Tool

Click the “Blue Word: IoT Guesthouse” above to follow us Starting today, we will learn about the smart dormitory system. For the front end, we will use WeChat Mini Programs for development, and for the server, we will choose the open-source IoT platform – Wumei Smart. After completing this series of courses, I believe everyone … Read more