Notes on SpringBook Knowledge

Creation and hot deployment of Springboot project 1. You need to choose your own dependencies when you create them. Idea will automatically generate the corresponding directory and startup classes. (Startup classes should be at the same level as othe ...

Posted on Mon, 26 Aug 2019 06:16:29 -0700 by 0p3n_p0rT

SpringBoot 2.x+Redis+nginx for session sharing and load balancing

1. Creating SpringBook Project Adding Dependencies <dependency> <groupId>org.springframework.session</groupId> <artifactId>spring-session-data-redis</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-st ...

Posted on Mon, 26 Aug 2019 01:53:08 -0700 by anto

SSH Development Model - Struts 2 (Section 2)

The last section has learned how to build the development environment of Struts 2. In this blog, we continue to go deep into Struts 2 and learn about the interceptor of Struts 2 framework. Firstly, we analyze the source code of the filter configured in the web.xml file. In the StrutsPrepareAndExecuteFilter source code, there is an init() method ...

Posted on Sun, 25 Aug 2019 23:12:45 -0700 by cityguru

Spring MVC Quick Start

Introduction Yesterday, some fans asked me what I should learn in the later stage of Java. I told them that they should learn frameworks. However, for a large number of frameworks, most people don't know which one to start with. My personal learning suggestion is: first learn SSH (Struts 2, Hibernate, Spring), then learn Spring MVC, Spring Data ...

Posted on Sun, 25 Aug 2019 20:59:32 -0700 by Crystal Dragon

Configure Servlet Container

SpringBoot uses Tomcat as the embedded Servlet container by default; 1. How to customize and modify the configuration of the Servlet container; 1. Modify server-related configurations (ServerProperties [also EmbeddedServletContainerCustomizer]); server.port=8081 server.context‐path=/crud server.tomcat.uri‐encoding=UTF‐8 //Universal ...

Posted on Sun, 25 Aug 2019 10:44:12 -0700 by synergypoint

Spring MVC Source Analysis 3: Initialization and Request Forwarding of Dispatcher Servlet

When we first learned Servlet programming and java web, there were not so many frameworks. The simple thing we need to do to develop a simple function is to inherit the HttpServlet, rewrite the doGet, doPost method as needed, and jump to our defined jsp page. After the Servlet class is written, the Servlet class is registered in web.xml. There ...

Posted on Sun, 25 Aug 2019 02:56:32 -0700 by donnierivera

Spring Source Analysis 5: JDK and cglib Dynamic Agent Principles

AOP is based on Java dynamic proxy. Understanding and using two kinds of dynamic proxy can help us understand AOP better. Before explaining AOP, let's first look at how Java dynamic proxy is used and the underlying implementation principles. From https://www.jianshu.com/u/668d0795a95b This paper is based on jdk1.8 to explore the underlying mech ...

Posted on Sun, 25 Aug 2019 02:46:22 -0700 by doodmon

Detailed Explanation of Factory Model [01] [01] [01]

Articles Catalogue 1. Simple Factory Model 1.1 Code Implementation 1.1.1 Product abstract class 1.1.2 Specific product categories 1.1.3 Simple Factory Class 1.1.4 Test Class 1.2 Applicable Scenarios 1.3 Advantages/Disadvantages Advantages of 1 ...

Posted on Sat, 24 Aug 2019 06:23:48 -0700 by sushant_d84

Proxy Triple Axe for Springboot Source Analysis

Summary: In the process of Spring's version change, annotations have changed a lot, but the design of proxy has also changed subtly, from Spring 1.x's ProxyFactoryBean's hard-coded island Spring 2.x's Aspectj annotations to now's well-known automatic proxy. Explain: Relevant Configuration Classes of ProxyConfig Agent AdvisedSupport implemen ...

Posted on Sat, 24 Aug 2019 01:41:37 -0700 by wkrauss

Spring Retrospective Learning Spring and Spring MVC Integration

Container integration of spring and spring MVC Spring (parent container) and spring-mvc (child container) The child container can get all objects in the parent container The parent container cannot get objects in the child container When us ...

Posted on Fri, 23 Aug 2019 04:56:12 -0700 by mebar3