How Spring Boot tests packaged deployments

I. Development Phase (1) Unit testing The most important thing in the development phase is unit testing, and Spring Boot's support for unit testing is already complete. 1. Add dependencies to the pom.xml file <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</arti ...

Posted by boo_lolly on Sun, 23 Feb 2020 18:56:52 -0800

Auto configuration data source of Springboot2.x

DataSourceAutoConfiguration @Configuration(proxyBeanMethods = false) @ConditionalOnClass({ DataSource.class, EmbeddedDatabaseType.class }) @EnableConfigurationProperties(DataSourceProperties.class) @Import({ DataSourcePoolMetadataProvidersConfiguration.class, DataSourceInitializationConfiguration.clas ...

Posted by jrobles on Sun, 23 Feb 2020 03:04:52 -0800

14. The use of listener in SpringBoot

1.1 introduction to monitor What is a web listener? A web listener is a special class in a Servlet that helps developers listen to specific events in the web, such as ServletContext, Httpsession, creation and destruction of ServletRequest, creation, destruction and modification of variables can be added before and after certain actions to real ...

Posted by avario on Sat, 22 Feb 2020 21:52:50 -0800

Principle analysis of mybatis Spring integration

I have combed the workflow and key source code of MyBatis when it is used alone. Now let's see how MyBatis works when it is integrated with Spring Start with use Spring integrates MyBatis 1. Introduce dependency. In addition to the dependency of MyBatis, you need to introduce the dependency of MyB ...

Posted by juschillin on Sat, 22 Feb 2020 20:43:01 -0800

ElasticSearch uses RestHighLevelClient to search and query

There are four types of client connection methods in the Elasticsearch Java API: TransportClient, RestClient, Jest, and spring [data] Elasticsearch. Among them, TransportClient and RestClient are the native api of Elasticsearch. TransportClient will be deleted in version 8.0, instead of HighLevelRestCli ...

Posted by JOWP on Sat, 22 Feb 2020 19:20:16 -0800

[MySQL] Use MySQL (connect, select database, display database and table information)

Chapter 3 Using MySQL Article Directory Chapter 3 Using MySQL Connect Select Database Understanding databases and tables Summary Simple Records - MySQL will always - [English]Ben Forta You'll learn how to connect to and log in to MySQL, how to execute MySQL statements, and how to get information ...

Posted by TravisJRyan on Sat, 22 Feb 2020 18:48:14 -0800

Get a thorough understanding of Auto-assembly and Autoowired in Spring

Untitled 1. Automatic assembly When Spring assembles Bean properties, it is sometimes quite clear that a reference to a Bean needs to be assembled to the specified properties.For example, if there is only one Bean of type org.mybatis.spring.SqlSessionFactoryBean in our application context, then any ...

Posted by 990805 on Sat, 22 Feb 2020 16:17:00 -0800

Spring Boot bottom level Exploration Series 04 - Web Development

Article directory Handling JSON data 1. Edit the Book class 2. Edit BookController controller 3. Convert set data 4. Replace the converter 1) Use Gson 2) Using fastjson Jiang Shuai, Naixue education, is good at system architecture design, big data, operation and maintenance and other technica ...

Posted by glitch003 on Sat, 22 Feb 2020 03:57:14 -0800

Tangent programming in Spring Boot, explanation of example scenario (log printing)

Article directory 1. What is AOP 2.Spring Boot integrated AOP 2.1 add maven dependency 2.2 section programming (implementation of log printing example) 2.2.1 create the facet class LogAspectHandler.java 2.2.2 @Pointcut: pointcut 2.2.3 @Before: pre advice 2.2.4 @After: Post advice 2.2.5 @AfterReturn ...

Posted by abriggs on Sat, 22 Feb 2020 01:45:48 -0800

Common design patterns in Java framework

Article directory Preface 1. What is design pattern 2. Java reflection technology 2.1 building objects by reflection 2.2 reflection method 2.3. Example 3. Dynamic agent mode 3.1. JDK dynamic agent 3.2 CGLIB dynamic agent 3.3 interceptor 3.4. Example 4. Responsibility chain model 4.1. Example 5. O ...

Posted by rickaclark on Fri, 21 Feb 2020 20:55:30 -0800