Don't Learn Countless - Getting Started with SpringBoot VI

SpringBoot 1 Connect to the database The Spring framework helps you connect to databases by connecting from JDBC to mapping elements using JdbcTemplate.For example, Hibernate and Spring Data provide higher-level functionality, create an implementation of Repository, and use methods in the interface and mapping of specific SQL from xml files to ...

Posted by martincrumlish on Tue, 07 May 2019 02:00:39 -0700

Template Method Patterns for Design Patterns (Behavioral Patterns)

[TOC] I. Pattern Definition The template method pattern defines some skeleton methods in an abstract class, and then defers some methods to the inherited class through the method of class inheritance. Template method pattern is a kind of behavioral pattern, and it is a common method. It does not belong to the object behavioral patt ...

Posted by doofystyle on Sun, 05 May 2019 10:16:38 -0700

Database connection pool, implementation and analysis

There is a problem in our daily operation of the database. We need to establish a database connection for each data operation request. Every time a connection is established, it takes a lot of overhead, such as loading the driver class, registering the driver, and getting the connection. If the connection is made several times i ...

Posted by Dima on Thu, 02 May 2019 23:10:37 -0700

Design Mode Learning Notebook Handbook

Article directory Classification of GoF Design Patterns 1.1 Creative 1.2 Structural Type 1.3 Behavioral Type II. Overview of Design Principles 2.1 Summary of Object-Oriented Design Principles: 2.2 Single Responsibility Principle 2.3 Open-Close Principle 2.4 Richter Substitution Principle 2.5 Dependence on reversal principl ...

Posted by phpnewbie911 on Wed, 01 May 2019 22:50:37 -0700

Java implements JDBC connection sql sever2012 connection

I. Preparations Import the corresponding jdbc.jar package: Right-click in the current project, select Build Path, and select Configure Build Path. Under the Libraries tab, click Add External JARS on the right and select the appropriate jar package. JDBC connection sql sever2012: https://pan.baidu.com/disk/home?errno=0&e ...

Posted by Guardian2006 on Sun, 28 Apr 2019 04:30:37 -0700

What pits are encountered in JAVA distributed development

1. Trampling Records in Spring Use image Spring uses multiple data sources through annotations Pit: @Autowire is automatically injected by byType, while @Resource is automatically injected by byName by default, @Primary is the preferred choice. For example, in a project there are two Redis sources, dataRedisTemplate and red ...

Posted by gabo0303 on Sat, 27 Apr 2019 05:30:36 -0700

SpringBook Advanced JdbcTemplate Data Query Chapter 2

SpringBook Advanced Paper JdbcTemplate Data Query Part I This paper describes how to use JdbcTemplate to perform simple query operations. It mainly introduces the invocation postures of three methods: queryForMap, queryForList and queryForObject. queryForRowSet query <!-- more --> I. Environmental preparation The environment is still co ...

Posted by danmahoney245 on Tue, 23 Apr 2019 17:48:35 -0700

Understanding and Analysis of Reflection Mechanism in JAVA

BS53 project uses java reflection to get custom controls, then instantiates them and displays them on the page. It realizes that only one configuration file is needed to display the whole page, and supports different configurations in 5 styles. Basically all depends on reflection technology. Now let's take a brief look at reflection technology ...

Posted by danoli on Sun, 21 Apr 2019 18:18:35 -0700

Database Operating Tool-Query Runner

After learning about JDBC and database operations, it is obvious that writing JDBC code is not an easy task. In order to help us learn more efficiently and get rid of the heavy code of JDBC, Tong gave us a detailed introduction to a component that simplifies JDBC operations, DBUtils. Today we have mainly studied the two classes and an inter ...

Posted by shwanky on Fri, 19 Apr 2019 23:15:33 -0700

mybatis Framework (3) - Configuration File Information

Introduction The last blog summarized the core components of the mybatis framework. This blog summarized the elements of the mybatis core configuration file and the role of the configuration elements. Summary Mybatis implements ORM mapping through core configuration files, commonly named mybatis-config.xml. There are many elements in this co ...

Posted by glcarlstrom on Tue, 16 Apr 2019 01:00:32 -0700