秒搭Spring + Spring MVC + Mybatis(SSM)项目整合

 

             Spring + Spring MVC + Mybatis(SSM)项目   


目录

             Spring + Spring MVC + Mybatis(SSM)项目   

 

 

SSH 

SSM

一,项目目录

二.配置文件总览

      2.1pom.xml  maven项目依赖 (可以直接复制用,无需强行背诵毫无意义)

        2.2 Web.xml配置

       2.3 Spring的配置文件

          2.4 SpringMVC配置文件

           2.5(1) Mybatis配置文件 spring_mybatis.xml

     2.5(2) Mybatis配置文件 configuration.xml(总)

     2.5(3) Mybatis配置文件 UserMapper.xml(子)

     2.6数据库的配置文件mysql.properties

     2.7 数据库的配置文件log4j.properties

     2.8一个测试的JSP页面

三.运行测试

四.tomcat没有报错,项目搭建成功


 

SSH 


          Spring + Struts + Hibernate

SSM

          Spring + Spring MVC + Mybatis(用的非常多) 轻量化,简单
                           (struts)     (hibernate)

            A(IoC容器) + B(MVC框架) + C(ORM框架) object-reation mapping=对象和关系(表)的映射

                也可以有其他搭配方式
                   spring + struts    + mybatis
                  spring + springmvc + hibernate

              实际并不常见,只要掌握了SSH和SSM的整合,其他两种整合也容易处理,网上也有相关文章介绍。
     直接搜索以上组合的关键字既可。

          

一,项目目录

二.配置文件总览

      2.1pom.xml  maven项目依赖 (可以直接复制用,无需强行背诵毫无意义)

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.tarena</groupId>
  <artifactId>SSMDemo</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>
  
   <properties>
	<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <spring.version>4.3.7.RELEASE</spring.version>
    <!-- 可控版本 -->
  </properties>
  <dependencies>
  	<!-- spring context基础依赖包 -->
  	<dependency>
	  <groupId>org.springframework</groupId>
	  <artifactId>spring-context</artifactId>
	  <version>${spring.version}</version>
	</dependency>
	<!-- spring aop -->
    <dependency>
	  <groupId>org.springframework</groupId>
	  <artifactId>spring-aop</artifactId>
	  <version>${spring.version}</version>
	</dependency>
	<dependency>
	  <groupId>org.aspectj</groupId>
	  <artifactId>aspectjweaver</artifactId>
	  <version>1.8.7</version>
	</dependency>
	<!--  -->
	<dependency>
	  <groupId>aopalliance</groupId>
	  <artifactId>aopalliance</artifactId>
	  <version>1.0</version>
	</dependency>
	<!-- ======================================================================= -->
		<!-- spring mvc -->
	<dependency>
	  <groupId>org.springframework</groupId>
	  <artifactId>spring-web</artifactId>
	  <version>${spring.version}</version>
	</dependency>
	<dependency>
	  <groupId>org.springframework</groupId>
	  <artifactId>spring-webmvc</artifactId>
	  <version>${spring.version}</version>
	</dependency>
	<!-- springmvc  的辅助依赖包 -->
	<!-- spring mvc的辅助依赖包   解析json -->
<dependency>
          <groupId>com.fasterxml.jackson.core</groupId>
          <artifactId>jackson-annotations</artifactId>
          <version>2.7.0</version>
      </dependency>
      <dependency>
          <groupId>com.fasterxml.jackson.core</groupId>
          <artifactId>jackson-core</artifactId>
          <version>2.7.5</version>
      </dependency>
      <dependency>
          <groupId>com.fasterxml.jackson.core</groupId>
          <artifactId>jackson-databind</artifactId>
          <version>2.7.0</version>
      </dependency>
<!-- log4j的依赖包 -->
	<dependency>  
	  <groupId>log4j</groupId>
	  <artifactId>log4j</artifactId>
	  <version>1.2.17</version>
	</dependency>
      <!-- 第三方解析json -->
		<dependency>
          <groupId>com.alibaba</groupId>
          <artifactId>fastjson</artifactId>
          <version>1.2.47</version>
 </dependency>
	<!-- spring jdbc -->
	<dependency>
	  <groupId>org.springframework</groupId>
	  <artifactId>spring-jdbc</artifactId>
	  <version>${spring.version}</version>
	</dependency>
	<!-- spring 事务管理 -->
	<dependency>
	  <groupId>org.springframework</groupId>
	  <artifactId>spring-tx</artifactId>
	  <version>${spring.version}</version>
	</dependency>
	
		<!-- ======================================================================= -->
		<!-- mybatis  -->
	<dependency>
	  <groupId>org.mybatis</groupId>
	  <artifactId>mybatis</artifactId>
	  <version>3.4.5</version>
	</dependency>
	<!-- mybatis-spring -->
	<dependency>
	  <groupId>org.mybatis</groupId>
	  <artifactId>mybatis-spring</artifactId>
	  <version>1.3.0</version>
	</dependency>
	<!-- 阿里巴巴的连接池 -->
	<dependency>
	  <groupId>com.alibaba</groupId>
	  <artifactId>druid</artifactId>
	  <version>1.0.14</version>
	</dependency>
	<!-- mysql的驱动 -->
	<dependency>
	  <groupId>mysql</groupId>
	  <artifactId>mysql-connector-java</artifactId>
	  <version>5.0.8</version>
	</dependency>
	<!-- 选做的 jasper的依赖包 -->
<!-- 	<dependency> -->
<!-- 	    <groupId>org.apache.tomcat.embed</groupId> -->
<!-- 	    <artifactId>tomcat-embed-jasper</artifactId> -->
<!-- 	    <version>9.0.2</version> -->
<!-- 	</dependency> -->
	<!-- 选做的servlet的依赖包 -->
<!-- 	<dependency> -->
<!-- 	  <groupId>javax.servlet</groupId> -->
<!-- 	  <artifactId>servlet-api</artifactId> -->
<!-- 	  <version>2.5</version> -->
<!-- 	</dependency> -->
		
	</dependencies>
  
  <build>
	<plugins>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-compiler-plugin</artifactId>
			<version>2.0.2</version>
			<configuration>
				<source>1.8</source>
				<target>1.8</target>
				<encoding>${project.build.sourceEncoding}</encoding>
			</configuration>
		</plugin>
	</plugins>
  </build>
</project>

        2.2 Web.xml配置

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
  <display-name>testssm</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
  <!-- 全局初始化数据,spring的监听器读取此配置文件 
	多个配置文件用分号分隔 -->
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>
		          classpath:conf/spring.xml;
		          classpath:conf/spring_mybatis.xml		         
		</param-value>
	</context-param>
	<!-- spring容器初始化的监听器,会读取全局初始化的数据(xml文件) -->
	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>
	<!-- spring处理中文乱码问题,只能post请求 -->
	<filter>
		<filter-name>encodingFilter</filter-name>
		<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
		<init-param>
			<param-name>encoding</param-name>
			<param-value>UTF-8</param-value>
		</init-param>
		<init-param>
			<param-name>forceEncoding</param-name>
			<param-value>true</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>encodingFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	
	<!-- spring mvc的入口 加载spring mvc -->	
	<servlet>
		<servlet-name>dispatcher</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<init-param>
			<param-name>contextConfigLocation</param-name>
			<param-value>classpath:conf/spring_mvc.xml</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>dispatcher</servlet-name>
		<url-pattern>*.do</url-pattern>
	</servlet-mapping>
</web-app>

       2.3 Spring的配置文件

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xmlns:aop="http://www.springframework.org/schema/aop"
	xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:p="http://www.springframework.org/schema/p"
	xmlns:util="http://www.springframework.org/schema/util" 
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:mvc="http://www.springframework.org/schema/mvc"
	xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/aop 
        http://www.springframework.org/schema/aop/spring-aop.xsd
        http://www.springframework.org/schema/tx 
        http://www.springframework.org/schema/tx/spring-tx.xsd
        http://www.springframework.org/schema/util 
        http://www.springframework.org/schema/util/spring-util.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc.xsd">
	
   <!-- 加载属性文件 此种方式加载属性文件是给spring的配置文件使用的 -->
   <context:property-placeholder
      location="classpath:conf/mysql.properties"/> 	
         
   <!-- 扫描service包,实例化带有@Service注解 -->
   <context:component-scan base-package="com.tarena.service"></context:component-scan>
   <!-- 扫描util包,实例化带有@Component注解 -->
   <context:component-scan base-package="com.tarena.util"></context:component-scan>
</beans>

          2.4 SpringMVC配置文件

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xmlns:aop="http://www.springframework.org/schema/aop"
	xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:p="http://www.springframework.org/schema/p"
	xmlns:util="http://www.springframework.org/schema/util" 
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:mvc="http://www.springframework.org/schema/mvc"
	xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/aop 
        http://www.springframework.org/schema/aop/spring-aop.xsd
        http://www.springframework.org/schema/tx 
        http://www.springframework.org/schema/tx/spring-tx.xsd
        http://www.springframework.org/schema/util 
        http://www.springframework.org/schema/util/spring-util.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc.xsd">

	
	<!-- 扫描spring的组件 -->
	<context:component-scan base-package="com.tarena.controller"></context:component-scan>


	<!-- 扫描 spring mvc的注解 @RequestMapping @ResponseBody -->
	<mvc:annotation-driven></mvc:annotation-driven>
	<!-- 内部资源视图解析器,用于渲染jsp页面,拼装响应的url -->
	<bean id="jspViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
	    <property name="prefix" value="/"/>
	    <property name="suffix" value=".jsp"/>
	</bean>
	
	

</beans>

           2.5(1) Mybatis配置文件 spring_mybatis.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xmlns:aop="http://www.springframework.org/schema/aop"
	xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:p="http://www.springframework.org/schema/p"
	xmlns:util="http://www.springframework.org/schema/util" 
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:mvc="http://www.springframework.org/schema/mvc"
	xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/aop 
        http://www.springframework.org/schema/aop/spring-aop.xsd
        http://www.springframework.org/schema/tx 
        http://www.springframework.org/schema/tx/spring-tx.xsd
        http://www.springframework.org/schema/util 
        http://www.springframework.org/schema/util/spring-util.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc.xsd">

	<!-- 数据库连接池 commons-dbcp ,c3p0,proxool,阿里巴巴druid -->
	<bean id="alibabaDataSource"
	      class="com.alibaba.druid.pool.DruidDataSource"
	      init-method="init"
	      destroy-method="close">
	    <!-- 数据库连接的4项 -->
		<property name="driverClassName">
			<value>${jdbc_driverClass}</value>
		</property>
		<property name="url">
			<value>${jdbc_url}</value>
		</property>
		<property name="username">
			<value>${jdbc_userName}</value>
		</property>
		<property name="password">
			<value>${jdbc_userPassword}</value>
		</property>		
	</bean>
	<!-- 实例化MyBatis的SqlSessionFactoryBean对象-->
	<!--mybatis配置,读取配置文件(扫描配置文件)-->
    <bean id="sqlSessionFactory"
        class="org.mybatis.spring.SqlSessionFactoryBean"
		p:dataSource-ref="alibabaDataSource"
		p:configLocation="classpath:conf/configuration.xml"
		p:mapperLocations="classpath:mapper/*.xml">
    </bean>
    <!-- 扫描所有XXXMapper的对象 用户生成代理对象的-->
	<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"
        p:basePackage="com.tarena.dao"
		p:sqlSessionFactoryBeanName="sqlSessionFactory">
    
    </bean>
    
    <!-- spring 事务管理开始 -->	
    
    <!-- Spring jdbc 的事务管理器 -->
    <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <property name="dataSource" ref="alibabaDataSource"/>
    </bean>
    
    <!-- 扫描事务有关的注解@Transactional -->
    <tx:annotation-driven transaction-manager="txManager"/>
   
    <!-- Spring事务管理结束 -->
</beans>

       

     2.5(2) Mybatis配置文件 configuration.xml(总)

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
	
	<typeAliases>
		<typeAlias type="com.tarena.entity.User" alias="User"/>
		
	</typeAliases>
	
	
</configuration>

     2.5(3) Mybatis配置文件 UserMapper.xml(子)

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.tarena.dao.UserMapper">
	<select id="login" 
	        parameterType="User"
	        resultType="java.lang.Integer">
		select 
		     id
		from t_user
		where username=#{name} and
		      userpassword=#{password}
	</select>
	
	
	
</mapper>

     2.6数据库的配置文件mysql.properties

jdbc_driverClass=com.mysql.jdbc.Driver
jdbc_url=jdbc:mysql://localhost:3306/testdb
jdbc_userName=root
jdbc_userPassword=root

     2.7 数据库的配置文件log4j.properties

# Set The RootLogger
log4j.rootLogger=debug, console

# Direct Log Messages To Console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.Target=System.out
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %p %c:%L - %m%n

 

     2.8一个测试的JSP页面

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<div style="text-align:center">
		<div style="font-size:30px;font-weight:bold;">用户登录</div>
		<form action="user/login.do" method="post">
		<table align="center" border="1">
		  <tr>
		     <td>用户名:</td>
		     <td><input type="text" name="userName"/></td>
		  </tr>
		  <tr>
		     <td>密码:</td>
		     <td><input type="password" name="userPassword"/></td>
		  </tr>
		  <tr>
		     <td colspan="2">
		     	<input type="submit" value="登录"/>
		     	<input type="reset" value="重置" />
		     </td>
		  </tr>
		</table>
		</form>
	
	</div>
	
</body>
</html>

 

三.运行测试

四.tomcat没有报错,项目搭建成功

五月 18, 2019 9:37:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/8.5.38
五月 18, 2019 9:37:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Feb 5 2019 11:42:42 UTC
五月 18, 2019 9:37:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         8.5.38.0
五月 18, 2019 9:37:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 10
五月 18, 2019 9:37:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            10.0
五月 18, 2019 9:37:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
五月 18, 2019 9:37:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             C:\Program Files\Java\jre1.8.0_73
五月 18, 2019 9:37:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.8.0_73-b02
五月 18, 2019 9:37:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
五月 18, 2019 9:37:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         F:\WEB最终小项目\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
五月 18, 2019 9:37:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         F:\tomcat\apache-tomcat-8.5.38
五月 18, 2019 9:37:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=F:\WEB最终小项目\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
五月 18, 2019 9:37:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=F:\tomcat\apache-tomcat-8.5.38
五月 18, 2019 9:37:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=F:\WEB最终小项目\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps
五月 18, 2019 9:37:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=F:\tomcat\apache-tomcat-8.5.38\endorsed
五月 18, 2019 9:37:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
五月 18, 2019 9:37:12 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jre1.8.0_73\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.8.0_73/bin/server;C:/Program Files/Java/jre1.8.0_73/bin;C:/Program Files/Java/jre1.8.0_73/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.8.0_73\bin;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;F:\apache-maven-3.5.0-bin\apache-maven-3.5.0\bin;C:\Users\Lenovo\AppData\Local\Microsoft\WindowsApps;;F:\eclipse\eclipse;;.]
五月 18, 2019 9:37:12 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-nio-8080"]
五月 18, 2019 9:37:12 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
五月 18, 2019 9:37:12 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-nio-8009"]
五月 18, 2019 9:37:12 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
五月 18, 2019 9:37:12 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 785 ms
五月 18, 2019 9:37:12 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service [Catalina]
五月 18, 2019 9:37:12 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.5.38
五月 18, 2019 9:37:13 下午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
警告: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [219] milliseconds.
五月 18, 2019 9:37:15 下午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
五月 18, 2019 9:37:15 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
五月 18, 2019 9:37:15 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
五月 18, 2019 9:37:17 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring FrameworkServlet 'dispatcher'
五月 18, 2019 9:37:19 下午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
五月 18, 2019 9:37:19 下午 org.apache.jasper.servlet.TldScanner scanJars
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
五月 18, 2019 9:37:19 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
五月 18, 2019 9:37:19 下午 org.springframework.web.context.ContextLoader initWebApplicationContext
信息: Root WebApplicationContext: initialization started
五月 18, 2019 9:37:19 下午 org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
信息: Refreshing Root WebApplicationContext: startup date [Sat May 18 21:37:19 CST 2019]; root of context hierarchy
五月 18, 2019 9:37:19 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [conf/spring.xml]
五月 18, 2019 9:37:19 下午 org.springframework.web.context.ContextLoader initWebApplicationContext
信息: Root WebApplicationContext: initialization completed in 346 ms
五月 18, 2019 9:37:19 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring FrameworkServlet 'dispatcher'
五月 18, 2019 9:37:19 下午 org.springframework.web.servlet.DispatcherServlet initServletBean
信息: FrameworkServlet 'dispatcher': initialization started
五月 18, 2019 9:37:19 下午 org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
信息: Refreshing WebApplicationContext for namespace 'dispatcher-servlet': startup date [Sat May 18 21:37:19 CST 2019]; parent: Root WebApplicationContext
五月 18, 2019 9:37:19 下午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from class path resource [conf/spring_mvc.xml]
五月 18, 2019 9:37:20 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
信息: Mapped "{[/user/login1.do],methods=[POST]}" onto public org.springframework.web.servlet.ModelAndView com.tarena.controller.UserController.login1(java.lang.String,java.lang.String)
五月 18, 2019 9:37:20 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
信息: Mapped "{[/user2/login4.do],methods=[POST]}" onto public java.lang.String com.tarena.controller.UserController.login4(java.lang.String,java.lang.String,java.util.Map)
五月 18, 2019 9:37:20 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
信息: Mapped "{[/user/login4.do],methods=[GET]}" onto public org.springframework.web.servlet.ModelAndView com.tarena.controller.UserController.login4(com.tarena.controller.User)
五月 18, 2019 9:37:20 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
信息: Mapped "{[/user2/login2.do],methods=[POST]}" onto public java.lang.String com.tarena.controller.UserController.login2(java.lang.String,java.lang.String,org.springframework.ui.Model)
五月 18, 2019 9:37:20 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
信息: Mapped "{[/user/login2.do],methods=[POST]}" onto public org.springframework.web.servlet.ModelAndView com.tarena.controller.UserController.login9(java.lang.String,java.lang.String)
五月 18, 2019 9:37:20 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
信息: Mapped "{[/user2/login3.do],methods=[POST]}" onto public java.lang.String com.tarena.controller.UserController.login3(java.lang.String,java.lang.String,org.springframework.ui.ModelMap)
五月 18, 2019 9:37:20 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
信息: Mapped "{[/user/login3.do],methods=[POST]}" onto public org.springframework.web.servlet.ModelAndView com.tarena.controller.UserController.login3(com.tarena.controller.User)
五月 18, 2019 9:37:20 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
信息: Mapped "{[/user3/redirectUrl.do]}" onto public java.lang.String com.tarena.controller.UserController3.redirectMethod()
五月 18, 2019 9:37:20 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
信息: Mapped "{[/user3/login1.do],methods=[GET]}" onto public java.lang.String com.tarena.controller.UserController3.login1(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,javax.servlet.http.HttpSession) throws java.lang.Exception
五月 18, 2019 9:37:20 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
信息: Mapped "{[/user2/login5_1.do],methods=[GET]}" onto public void com.tarena.controller.UserController3.login5_1(java.lang.String,java.lang.String,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
五月 18, 2019 9:37:20 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
信息: Mapped "{[/user2/login5.do],methods=[GET]}" onto public com.tarena.vo.Result com.tarena.controller.UserController3.login5(java.lang.String,java.lang.String)
五月 18, 2019 9:37:21 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter initControllerAdviceCache
信息: Looking for @ControllerAdvice: WebApplicationContext for namespace 'dispatcher-servlet': startup date [Sat May 18 21:37:19 CST 2019]; parent: Root WebApplicationContext
五月 18, 2019 9:37:21 下午 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter initControllerAdviceCache
信息: Looking for @ControllerAdvice: WebApplicationContext for namespace 'dispatcher-servlet': startup date [Sat May 18 21:37:19 CST 2019]; parent: Root WebApplicationContext
五月 18, 2019 9:37:21 下午 org.springframework.web.servlet.DispatcherServlet initServletBean
信息: FrameworkServlet 'dispatcher': initialization completed in 1955 ms
五月 18, 2019 9:37:21 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
五月 18, 2019 9:37:21 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
五月 18, 2019 9:37:21 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 9251 ms

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值