Beginner SpringBoot - automatic configuration

Auto configuration 1.1 automatically configure Tomcat Introduce tomcat dependency <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <version>2.3.12.RELEASE</version> <scope>compile</scope> </dependen ...

Added by python_q on Sat, 01 Jan 2022 12:13:53 +0200

@ Lookup annotation of Spring dependency injection

@ Lookup annotation of Spring dependency injection When understanding the Spring constructor inference, I saw the following source code: problem analysis Generally, we will use the @ Autowired annotation to realize the automatic injection of dependencies: Attribute injection @Component public class Xxx{ @Autowired private Aa ...

Added by Kingkerry on Sat, 01 Jan 2022 11:26:25 +0200

Method of getting front-end parameters in spring MVC

1, HttpServletRequest @RequestMapping("/...") public ModelAndView doSome(HttpservletRequest request,HttpServletResponse response,HttpSession session) { String name = request.getParameter("name");//Received parameters } 2, HttpServletResponse 3, HttpSession 4, User submitted data Receive parameters submitted by users: 1. Receive one by on ...

Added by zvonko on Sat, 01 Jan 2022 08:57:57 +0200

Spring5JdbcTemplate and transaction

JdbcTemplate Jdbctemplate (concept and preparation) 1. What is a JdbcTemplate? The Spring framework encapsulates JDBC and uses JdbcTemplate to facilitate database operation. 2. Preparation (1) Import related jar packages (2) Configure the database connection pool in the Spring configuration file <!-- Database connection pool --&g ...

Added by ebgames56 on Sat, 01 Jan 2022 00:50:07 +0200

Spring MVC knowledge point 1

Spring MVC overview 1. Spring MVC overview 1) The excellent Web framework based on MVC design concept provided by Spring for the presentation layer is one of the most mainstream MVC frameworks at present 2)Spring3. After 0, it comprehensively surpassed struts 2 and became the best MVC framework. 3) Spring MVC uses a set of MVC annotations ...

Added by sandrol76 on Fri, 31 Dec 2021 19:51:29 +0200

Realize mobile phone login (SMS verification)

Login requirements 1. Login takes the form of pop-up layer 2. Login method: (1) Mobile phone number + mobile phone verification code (2) Wechat scanning 3. There is no registration interface. The first login determines whether the system exists according to the mobile phone number. If it does not exist, it will be registered automatically ...

Added by minds_gifts on Fri, 31 Dec 2021 13:18:58 +0200

Eight scenarios of Spring transaction failure

What scenarios do you use Spring's @ Transactional annotation to control transactions that do not take effect? I don't know if my friends have such an experience. When they are happy to write business code, suddenly the transaction in a method seems to fail. Then, when debug ging tracks the code, it is found that after the execution of the fir ...

Added by axon on Fri, 31 Dec 2021 09:47:36 +0200

Spring learning notes

Spring 1, Spring overview 1.1 coupling degree of Web project In the Servlet, you need to call the method in the service, and you need to create a new service instance in the Servlet class. At the same time, in the service implementation class, you also need to call the methods in DAO, and you also need to new an object of DAO implementation ...

Added by starmikky on Fri, 31 Dec 2021 02:28:24 +0200

Write a Spring framework with 300 lines of code. Although the sparrow is small, it has five dirty parts

This article is excerpted from Spring 5 core principles 1 custom configuration 1.1 configure application Properties file For the convenience of parsing, we use application Properties instead of application XML file. The specific configuration contents are as follows: scanPackage=com.tom.demo 1.2 configuring web XML file As we all know, all ...

Added by krio on Fri, 31 Dec 2021 01:09:32 +0200

Source code analysis of Spring IOC container

The most important concepts of Spring are IOC and AOP. This article is actually to lead you to analyze the IOC container of Spring. Since we usually use Spring, how can we not have a good understanding of Spring? Reading this article will not make you a Spring expert, but it will help you understand many concepts of Spring and help you troubles ...

Added by anth0ny on Thu, 30 Dec 2021 21:16:22 +0200