How to execute a piece of logic immediately after the Spring Boot application starts

1. Preface I don't know if you've received this requirement, so just execute some logic when the project starts.For example, simple cache preheating, or broadcasting after going online, and so on.If you use the Spring Boot framework, you can do so with its interfaces CommandLineRunner and ApplicationRunner. 2. CommandLineRunner org.springframe ...

Posted on Mon, 01 Jun 2020 22:56:55 -0400 by vjbrantner@purd

Spring Boot Implements Configuration File Encryption and Decryption Principle

Spring Boot profile encryption and decryption is as simple as that background Following "Return of Missing Persons, mybatis-plus 3.3.2 Release" [1], provides a very practical function, "Data Security Protection", which not only supports the configuration encryption of data sources, but also enables the encryption of sensitiv ...

Posted on Mon, 01 Jun 2020 21:04:17 -0400 by dspeer

flowable-6.5.0 running official demo

1. Download flowable-6.5.0 from the official website: https://flowable.com/open-source/downloads/ After downloading and unzipping, open the directory wars 2. Find a clean tomcat8 In the war file directory flowable-admin.war  flowable-idm.war  flowable-modeler.war  flowable-rest.war  flowable-task.war A total of 5 war packages are placed in ...

Posted on Mon, 01 Jun 2020 11:10:09 -0400 by krelian

A troubleshooting of Spring project packaging

A Spring project, which runs after jar package, is normal when there is a network, but once there is no network, an error will be reported. What's the matter? This article will record the troubleshooting process. Background A graphical interface with a local database is required to be able to run in a non network environment. The graphical in ...

Posted on Mon, 01 Jun 2020 00:56:38 -0400 by Ozzapoo

Java Spring Cloud Road to Actual Work - 1 Create Project

0. Preface The project is managed and built using Maven, so it needs to be preconfigured.Well, I haven't done much in this series. 1. Create a project Create one firstPom.xmlFile, add the following: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSc ...

Posted on Sun, 31 May 2020 12:34:53 -0400 by widget

spring boot custom starter

spring boot uses starter to solve many configuration problems, but how does it solve these problems Here is a simple example to see how starter sets the default configuration 1, Build starter project The project naming specification is: custom name spring boot starter Let's take a look at my last directory structure   1. Modification pom.xml ...

Posted on Sun, 31 May 2020 12:31:13 -0400 by tibberous

Four ways to read the properties file in SpringBoot

preface Configuration files are often used in project development. The existence of configuration files solves a lot of repeated work. Today, I'll share four ways to get configuration files in spring boot. Note: the first three test configuration files are spring boot default application.properties file ############ ...

Posted on Sun, 31 May 2020 10:24:51 -0400 by maca134

Spring Data Rest encounters a composite primary key

If the project persistence layer uses Spring Data JPA and some data tables contain composite primary keys (Union primary keys), how can the interface generated by Spring Data Rest access the data corresponding to a primary key in these data tables? Suppose the database has two data tables film with compound primary key ...

Posted on Sun, 31 May 2020 06:05:01 -0400 by rathlon

[Gradle tutorial] getting started with Gradle

This article is the address of the live room where I share the documents in the learning group in station B http://live.bilibili.com/22263819 PS: ask me, is there any good conference software under Linux? Thank you for your comments 00. Introduction Gradle is an open source automation construction tool, which supports multi language e ...

Posted on Sat, 30 May 2020 22:53:43 -0400 by DrJonesAC2

Currency conversion of Thymeleaf

#Overview This article describes how to use the page component, Thymeleaf, to automatically convert currencies #Maven depends on <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> <version>2.3.0.RELEASE</version> </de ...

Posted on Sat, 30 May 2020 10:30:37 -0400 by henkealf