3Spring Boot 3 integrates mybatis-plus+druid+mysql

Directory 【3】Spring Boot 3 integrated components: Druid + Mybatis Plus + Mysql integration solution 1. Hikari + jdbc + mysql integration solution increase dependency Add configuration Spring Testng test cases 2. Druid + Mybatis Plus + Mysql integration solution 2.1 Configure Druid Add dependencies Configuration Start Spring Boot Web Starter Spring Testng test cases 2.2 […]

Stop writing tool classes by yourself, Spring Boot has all the built-in tool classes you need! !

Assertion An assertion is a logical judgment that checks for something that shouldn’t happen The Assert keyword was introduced in JDK1.4 and can be turned on through the JVM parameter -enableassertions SpringBoot provides the Assert assertion tool class, which is usually used for data validity checking. //Requires parameter object to be non-null (Not Null), otherwise […]

Spring Boot implements various parameter verifications. It is so well written. It is recommended to collect it!

Hello everyone, I am a passerby~~~ Click on the card below to follow me, java dry goods will be delivered in time I have written an article about the use of Spring Validation before, but I still feel that I am superficial. This time I plan to thoroughly understand Spring Validation. This article will introduce […]

spring boot validation use

spring-boot-starter-validation is a module used in Spring Boot to support data validation. It is built on the Java Validation API (JSR-380) and provides a convenient way to validate data in applications. Here is the basic way to use spring-boot-starter-validation: Quick Start 1. Add dependencies: In your Spring Boot project’s pom.xml file, add the following dependencies: […]

Spring Boot(2)

1. Operation and maintenance 1.1. Packaging program The SpringBoot program is created based on Maven, and Maven provides packaging instructions called packages. This operation can be performed in the Idea environment. mvn package After packaging, a jar file with a similar project name will be generated, and its name is composed of module name + […]

Handling simple transactions in Spring Boot

Speaking of transactions, our first impact should be an important concept of database management systems. Transaction is a concept in a database management system (DBMS) that is used to manage a set of operations on the database. These operations are either all executed successfully or all are rolled back (undone). A transaction usually consists of […]

Spring Boot integrates Xxl-job to achieve awesome scheduled tasks

Article directory Why choose Xxl-job? Start integrating Xxl-job Step 1: Add dependencies Step 2: Configure the data source Step 3: Initialize database tables Step 4: Configure Xxl-job Step 5: Write scheduled tasks Step 6: Start the project Step 7: Access Xxl-job Admin Expansion: dynamically add and delete tasks Summarize Welcome to the architecture design column~Spring […]

Spring Boot interface data encryption and decryption, so easy!

Bucai Chen Coder Technology Column 2023-11-09 09:01 Published in Zhejiang Included in the collection #Spring Boot Advanced 99 Hello everyone, I am Bucai Chen~ Today’s article talks about interface security issues, involving interface encryption and decryption. After discussing external demands with students on products and front-end, we sorted out relevant technical solutions. The main demand […]

Spring Boot integration ElasticSearch

1 Add dependencies First create a project and add ES-related dependencies to the project. The specific dependencies are as follows: <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <version>7.1.0</version> </dependency> <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>elasticsearch-rest-high-level-client</artifactId> <version>7.1.0</version> </dependency> 2 Create ES configuration Configure the relevant parameters of ES in the configuration file application.properties. The specific contents are as follows: elasticsearch.host=localhost elasticsearch.port=9200 elasticsearch.connTimeout=3000 elasticsearch.socketTimeout=5000 […]