SpringMVC source code: Initialization of DispatcherServlet (3)

In the previous part, FrameworkServlet left onRefresh to DispatcherServlet to complete, So go into DispatcherServlet # onRefresh Refresh the Spring container (the sub-container is refreshed here) @Override protected void onRefresh(ApplicationContext context) {<!– –> initStrategies(context); //The parameter context here is the SpringWeb container created before (and later passed as a parameter to the initialization function of […]

JAVA-Experiment 5-Java Servlet

1.Experimental purpose: Master the principles and usage of Java Servlets 2. Experiment content: 1. Write an HTML page and a Servlet to use the doPost() method of Servlet() to read the Form content in the HTML file. 2. Write a Servlet for user login. When the user has logged in, a welcome message is returned. […]

Use Servlet to modify the fruit inventory system and use PostMan to test Servlet requests

<packaging>war</packaging> <dependencies> <dependency> <groupId>jakarta.servlet</groupId> <artifactId>jakarta.servlet-api</artifactId> <version>6.0.0</version> </dependency> <dependency> <groupId>com.csdn</groupId> <artifactId>pro03-fruit-optimize</artifactId> <version>1.0-SNAPSHOT</version> </dependency> </dependencies> pro03-fruit-optimize is a jar package packaged by myself. Its function is to realize the addition, deletion, modification and check of the fruit system 1. Query fruit list IndexServlet package com.csdn.fruit.servlet; import com.csdn.fruit.dao.FruitDao; import com.csdn.fruit.dao.impl.FruitDaoImpl; import com.csdn.fruit.pojo.Fruit; import jakarta.servlet.ServletException; import jakarta.servlet.annotation.WebServlet; import jakarta.servlet.http.HttpServlet; […]

Gateway error Unable to start ServletWebServerApplicationContext due to missing ServletWebServer

Problem error: Error 1: org.springframework.beans.factory.support.BeanDefinitionOverrideException: Invalid bean definition with name ‘conversionServicePostProcessor’ defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: Cannot register bean definition [Root bean: class [org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration]; scope=; abstract=false; lazyInit=null; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=conversionServicePostProcessor; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]] for bean \ ‘conversionServicePostProcessor’: There is already [Root bean: class [org.springframework.security.config.annotation.web.reactive.WebFluxSecurityConfiguration]; scope=; abstract=false; […]

Servlet vs. Spring!

Foreword: Spring-related framework knowledge is considered the cutting-edge knowledge currently used by the company, and it is very important! ! So how many frameworks are there based on Spring? The Spring-based framework includes several modules, the main ones are Spring Framework, Spring Boot, Spring Cloud, etc. Spring Framework: This is the most basic Spring framework, […]

[Tomcat Servlet] How to deploy a maven project on idea?

Table of Contents 1.Create project 2.Introduce dependencies 3.Create a directory 4. Write code 5. Packaging program 6. Deployment project 7. Verification procedure What are Tomcat and Servlets? Take idea2019 as an example: 1. Create project 1.1 First create a maven project 1.2 Project name 2.Introduce dependencies 2.1 Enter mvnrepository.com as the URL to enter the […]

org.springframework.context.ApplicationContextException: Unable to start ServletWe

D:\jdk15\bin\java.exe -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:55457,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring .output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dfile.encoding=UTF-8 -classpath “G:\projects\Server\guigu-ssyx-parent\service\service-acl\target\classes;D:\Maven\org\springframework\boot\spring- boot-starter-web\2.3.6.RELEASE\spring-boot-starter-web-2.3.6.RELEASE.jar;D:\Maven\org\springframework\boot\spring-boot- starter\2.3.6.RELEASE\spring-boot-starter-2.3.6.RELEASE.jar;D:\Maven\org\springframework\boot\spring-boot-starter-logging\2.3 .6.RELEASE\spring-boot-starter-logging-2.3.6.RELEASE.jar;D:\Maven\ch\qos\logback\logback-classic\1.2.3\logback- classic-1.2.3.jar;D:\Maven\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\Maven\ \org\apache\logging\log4j\log4j-to-slf4j\2.13.3\log4j-to-slf4j-2.13.3.jar;D:\Maven\org\apache\ logging\log4j\log4j-api\2.13.3\log4j-api-2.13.3.jar;D:\Maven\org\slf4j\jul-to-slf4j\1.7.30\ \jul-to-slf4j-1.7.30.jar;D:\Maven\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar; D:\Maven\org\springframework\spring-core\5.2.11.RELEASE\spring-core-5.2.11.RELEASE.jar;D:\Maven\org\springframework\ spring-jcl\5.2.11.RELEASE\spring-jcl-5.2.11.RELEASE.jar;D:\Maven\org\yaml\snakeyaml\1.26\snakeyaml-1.26.jar;D :\Maven\org\springframework\boot\spring-boot-starter-json\2.3.6.RELEASE\spring-boot-starter-json-2.3.6.RELEASE.jar;D:\ \Maven\com\fasterxml\jackson\core\jackson-databind\2.11.3\jackson-databind-2.11.3.jar;D:\Maven\com\fasterxml\jackson \core\jackson-annotations\2.11.3\jackson-annotations-2.11.3.jar;D:\Maven\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\ \2.11.3\jackson-datatype-jdk8-2.11.3.jar;D:\Maven\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.11.3\jackson -datatype-jsr310-2.11.3.jar;D:\Maven\com\fasterxml\jackson\module\jackson-module-parameter-names\2.11.3\jackson-module-parameter- names-2.11.3.jar;D:\Maven\org\springframework\boot\spring-boot-starter-tomcat\2.3.6.RELEASE\spring-boot-starter-tomcat-2.3. 6.RELEASE.jar;D:\Maven\org\apache\tomcat\embed\tomcat-embed-core\9.0.39\tomcat-embed-core-9.0.39.jar;D :\Maven\org\glassfish\jakarta.el\3.0.3\jakarta.el-3.0.3.jar;D:\Maven\org\apache\tomcat\embed\ \tomcat-embed-websocket\9.0.39\tomcat-embed-websocket-9.0.39.jar;D:\Maven\org\springframework\spring-web\5.2.11.RELEASE\ spring-web-5.2.11.RELEASE.jar;D:\Maven\org\springframework\spring-beans\5.2.11.RELEASE\spring-beans-5.2.11.RELEASE.jar;D :\Maven\org\springframework\spring-webmvc\5.2.11.RELEASE\spring-webmvc-5.2.11.RELEASE.jar;D:\Maven\org\springframework\spring -aop\5.2.11.RELEASE\spring-aop-5.2.11.RELEASE.jar;D:\Maven\org\springframework\spring-context\5.2.11.RELEASE\spring- context-5.2.11.RELEASE.jar;D:\Maven\org\springframework\spring-expression\5.2.11.RELEASE\spring-expression-5.2.11.RELEASE.jar;G:\ \projects\Server\guigu-ssyx-parent\common\service-util\target\classes;D:\Maven\org\apache\httpcomponents\httpclient\4.5.1\ \httpclient-4.5.1.jar;D:\Maven\org\apache\httpcomponents\httpcore\4.4.13\httpcore-4.4.13.jar;D:\Maven\commons- logging\commons-logging\1.2\commons-logging-1.2.jar;D:\Maven\commons-codec\commons-codec\1.14\commons-codec-1.14.jar;D:\ \Maven\io\jsonwebtoken\jjwt\0.7.0\jjwt-0.7.0.jar;D:\Maven\joda-time\joda-time\2.10.1\joda- time-2.10.1.jar;D:\Maven\org\springframework\boot\spring-boot-starter-data-redis\2.3.6.RELEASE\spring-boot-starter-data- redis-2.3.6.RELEASE.jar;D:\Maven\org\springframework\data\spring-data-redis\2.3.5.RELEASE\spring-data-redis-2.3.5. RELEASE.jar;D:\Maven\org\springframework\data\spring-data-keyvalue\2.3.5.RELEASE\spring-data-keyvalue-2.3.5.RELEASE.jar;D: \Maven\org\springframework\data\spring-data-commons\2.3.5.RELEASE\spring-data-commons-2.3.5.RELEASE.jar;D:\Maven\org \springframework\spring-tx\5.2.11.RELEASE\spring-tx-5.2.11.RELEASE.jar;D:\Maven\org\springframework\spring-oxm\5.2.11 .RELEASE\spring-oxm-5.2.11.RELEASE.jar;D:\Maven\org\springframework\spring-context-support\5.2.11.RELEASE\spring-context-support-5.2 .11.RELEASE.jar;D:\Maven\io\lettuce\lettuce-core\5.3.5.RELEASE\lettuce-core-5.3.5.RELEASE.jar;D:\Maven\ \org\apache\commons\commons-pool2\2.8.1\commons-pool2-2.8.1.jar;D:\Maven\org\redisson\redisson\3.11.2\ \redisson-3.11.2.jar;D:\Maven\io\\ etty\\ etty-common\4.1.54.Final\\ etty-common-4.1.54.Final.jar;D:\ Maven\io\\ etty\\ etty-codec\4.1.54.Final\\ etty-codec-4.1.54.Final.jar;D:\Maven\io\\ […]

JavaWeb – Servlet principle, life cycle, implementing a Servlet in IDEA (whole process)

6. servlet 6.1. What is servlet In JavaWeb, Servlet is a server-side component written in Java that is used to process HTTP requests sent by clients (usually web browsers) and generate corresponding HTTP responses. Servlet runs on the Web server, interacts with the Web container (such as Tomcat), and distributes the request to the appropriate […]