Spring Boot Read Configuration File
Development Environment: IntelliJ IDEA 2019.2.2Spring Boot Version: 2.1.8
Create a new SpringBoot project named demo.
1. Default Profile
Spring Boot reads the configuration file with the name application.properties(yml).If there are multiple files with the same name, by default, they are read in the following order:(1) The config directory o ...
Posted by sanju on Mon, 23 Sep 2019 09:57:06 -0700
java reflection knowledge
reflex
Article directory
reflex
Summary
Definition
purpose
Relevant Classes of Reflection Mechanisms
Class Class
Class Field
Class Method
Constructor class
1. Several Ways to Get Class Objects
Student object
Several Methods of Obtaining Class Objects
2. Get the construction method and use it
3. ...
Posted by wmguk on Sun, 22 Sep 2019 04:16:45 -0700
springBoot calls dynamic-datasource from multiple data sources
Introduction to 1 dynamic-datasource
This framework only does the core thing of switching data sources and does not restrict your specific operations.
Highly recommended in master-slave mode
Follow the general rules so that others can understand your code more easily.
The primary database recommends ...
Posted by dinno2 on Fri, 20 Sep 2019 18:08:41 -0700
Analysis of SpringBoot Automatic Assembly Principle
This article contains: SpringBoot's automatic configuration principle and how to customize SpringBootStar, etc.
We know that when using SpringBoot, we only need to start a Web program directly as follows:
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplic ...
Posted by howard-moore on Thu, 19 Sep 2019 18:52:49 -0700
Spring Framework - Simulate registration functionality (using annotations), pure annotation configuration
Simulate registration - use annotations
Simulate registration functionality (using annotations)
DAO Layer Code
Service Layer Code
Presentation Layer Code
Test Code
applicationContext.xml
Pure Annotation Configuration
problem
Sample Code
Getting Started Simply
Explain
Configuration steps
Step 1: Cr ...
Posted by savedlema on Wed, 18 Sep 2019 18:23:59 -0700
Custom Authentication Security Plug-in in Ignite
After Ignite cluster is built, the application can access the cluster for various operations. But the default cluster has no security protection mechanism. Any application and client supporting JDBC can access the cluster as long as they know the IP address of the cluster node, which creates a certain security risk, which is sensitive to holdin ...
Posted by adamwhiles on Tue, 17 Sep 2019 22:56:05 -0700
Spring Framework Learning 02
Spring02
1. Content introduction
1. Spring Configuration Data Source
2. Spring Annotation Development
3. Spring integrates Junit
Learning objectives
1) Knowing the data source (the role of connection pools)
2) Ability to complete Spring configur ...
Posted by djpeterlewis on Sat, 14 Sep 2019 07:07:15 -0700
SpringBoot uses JDBC to manipulate databases
1. Introduction to JDBC
JDBC (Java Data Base Connectivity, Java Database Connectivity) states that JDBC is a set of API specifications for Java access to databases; Spring Boot supports the mainstream ORM frameworks: MyBatis, Hibernate, and Spring JDBC. Several ORMs have their own advantages in different scenarios and have corresponding Sta wi ...
Posted by amcgrath on Fri, 13 Sep 2019 19:59:25 -0700
Abstract Factory Model of 23 Design Patterns in GOF
Abstract factory pattern
Used to produce all products of different product families. (There is nothing we can do to add new products; support the increase of product family)
Abstract factory pattern is an upgraded version of factory method pattern. ...
Posted by Phate on Sat, 07 Sep 2019 04:08:49 -0700
Hibernate Learning Notes: Level 2 Cache
The table for this example query is Hibernate Learning Notes (6): Many-to-One Mapping and One-to-Many Mapping Table used.
Test program CacheDemo.java:
package com.hibernate.cache;
import org.hibernate.SessionFactory;
import org.hibernate.Trans ...
Posted by jponte on Fri, 06 Sep 2019 02:46:19 -0700