SSM —— 不使用maven和springboot的简单的ssm框架部署(只加了日志)

项目结构:

怎么创建自定义日志参考另一篇博客:https://blog.csdn.net/DGH2430284817/article/details/85809862

SSM框架需要的包我就不提供了

步骤:

创建web项目:名字自己取。我这是SSM_Test

创建控制器:

DoorController.java

package com.test.controller;
import java.net.UnknownHostException;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ceb.dgh.bo.Door;
import com.qut.util.LoggerUtil;
import com.test.service.DoorService;

@RequestMapping("/door")
@Controller
public class DoorController {
	 private static Logger log = LoggerUtil.getLogger(DoorController.class);
    @Autowired 
    private DoorService doorService;

    @RequestMapping("/open")
    public String login( Door door , Model model) throws UnknownHostException{
    	log.info("进入控制器door/open,参数:" + door.toString());
    	
    	door = doorService.DoOpen(door.getName());
    	System.out.println("Door:" + door.toString());
        model.addAttribute("name",door.getName());
        model.addAttribute("pass",door.getPass());
        
        return "result";
    }
    
 
}

创建业务逻辑层:

DoorService .java

package com.test.service;

import com.ceb.dgh.bo.Door;

public interface DoorService {

    public Door DoOpen(String doorName);
}

DoorServiceImpl.java

package com.test.service.impl;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ceb.dgh.bo.Door;
import com.ceb.dgh.mapper.DoorMapper;
import com.qut.util.LoggerUtil;
import com.test.controller.DoorController;
import com.test.service.DoorService;

@Service
@Transactional(rollbackFor=Exception.class)
public class DoorServiceImpl implements DoorService{
	private static Logger log = LoggerUtil.getLogger(DoorController.class);
	@Autowired
    private DoorMapper doorMapper;
	
	@Override
	public Door DoOpen(String doorName) {
		log.info("进入业务层DoOpen方法");
		return doorMapper.selectByPrimaryKey(doorName);
	}

}

创建Dao层:

       创建Mysql数据库test,添加表door:

         加一条数据:

创建连接信息文件db.properties:

jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8
jdbc.username=root
jdbc.password=root

创建BO类和Mapper和数据库xml文件:

这个有很多种方法可以自动创建,不需要手写,我直接给代码:

Door.java:

package com.ceb.dgh.bo;

public class Door {
    private String name;

    private String pass;

    @Override
	public String toString() {
		return "Door [name=" + name + ", pass=" + pass + "]";
	}

	public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getPass() {
        return pass;
    }

    public void setPass(String pass) {
        this.pass = pass == null ? null : pass.trim();
    }
}

DoorExample.java

package com.ceb.dgh.bo;

import java.util.ArrayList;
import java.util.List;

public class DoorExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public DoorExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andNameIsNull() {
            addCriterion("name is null");
            return (Criteria) this;
        }

        public Criteria andNameIsNotNull() {
            addCriterion("name is not null");
            return (Criteria) this;
        }

        public Criteria andNameEqualTo(String value) {
            addCriterion("name =", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotEqualTo(String value) {
            addCriterion("name <>", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThan(String value) {
            addCriterion("name >", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameGreaterThanOrEqualTo(String value) {
            addCriterion("name >=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThan(String value) {
            addCriterion("name <", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLessThanOrEqualTo(String value) {
            addCriterion("name <=", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameLike(String value) {
            addCriterion("name like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotLike(String value) {
            addCriterion("name not like", value, "name");
            return (Criteria) this;
        }

        public Criteria andNameIn(List<String> values) {
            addCriterion("name in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotIn(List<String> values) {
            addCriterion("name not in", values, "name");
            return (Criteria) this;
        }

        public Criteria andNameBetween(String value1, String value2) {
            addCriterion("name between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andNameNotBetween(String value1, String value2) {
            addCriterion("name not between", value1, value2, "name");
            return (Criteria) this;
        }

        public Criteria andPassIsNull() {
            addCriterion("pass is null");
            return (Criteria) this;
        }

        public Criteria andPassIsNotNull() {
            addCriterion("pass is not null");
            return (Criteria) this;
        }

        public Criteria andPassEqualTo(String value) {
            addCriterion("pass =", value, "pass");
            return (Criteria) this;
        }

        public Criteria andPassNotEqualTo(String value) {
            addCriterion("pass <>", value, "pass");
            return (Criteria) this;
        }

        public Criteria andPassGreaterThan(String value) {
            addCriterion("pass >", value, "pass");
            return (Criteria) this;
        }

        public Criteria andPassGreaterThanOrEqualTo(String value) {
            addCriterion("pass >=", value, "pass");
            return (Criteria) this;
        }

        public Criteria andPassLessThan(String value) {
            addCriterion("pass <", value, "pass");
            return (Criteria) this;
        }

        public Criteria andPassLessThanOrEqualTo(String value) {
            addCriterion("pass <=", value, "pass");
            return (Criteria) this;
        }

        public Criteria andPassLike(String value) {
            addCriterion("pass like", value, "pass");
            return (Criteria) this;
        }

        public Criteria andPassNotLike(String value) {
            addCriterion("pass not like", value, "pass");
            return (Criteria) this;
        }

        public Criteria andPassIn(List<String> values) {
            addCriterion("pass in", values, "pass");
            return (Criteria) this;
        }

        public Criteria andPassNotIn(List<String> values) {
            addCriterion("pass not in", values, "pass");
            return (Criteria) this;
        }

        public Criteria andPassBetween(String value1, String value2) {
            addCriterion("pass between", value1, value2, "pass");
            return (Criteria) this;
        }

        public Criteria andPassNotBetween(String value1, String value2) {
            addCriterion("pass not between", value1, value2, "pass");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}

DoorMapper.java

package com.ceb.dgh.mapper;

import com.ceb.dgh.bo.Door;
import com.ceb.dgh.bo.DoorExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface DoorMapper {
    int countByExample(DoorExample example);

    int deleteByExample(DoorExample example);

    int deleteByPrimaryKey(String name);

    int insert(Door record);

    int insertSelective(Door record);

    List<Door> selectByExample(DoorExample example);

    Door selectByPrimaryKey(String name);

    int updateByExampleSelective(@Param("record") Door record, @Param("example") DoorExample example);

    int updateByExample(@Param("record") Door record, @Param("example") DoorExample example);

    int updateByPrimaryKeySelective(Door record);

    int updateByPrimaryKey(Door record);
}

DoorMapper.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.ceb.dgh.mapper.DoorMapper" >
  <resultMap id="BaseResultMap" type="com.ceb.dgh.bo.Door" >
    <id column="name" property="name" jdbcType="CHAR" />
    <result column="pass" property="pass" jdbcType="CHAR" />
  </resultMap>
  <sql id="Example_Where_Clause" >
    <where >
      <foreach collection="oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <foreach collection="criteria.criteria" item="criterion" >
              <choose >
                <when test="criterion.noValue" >
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue" >
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue" >
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue" >
                  and ${criterion.condition}
                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause" >
    <where >
      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <foreach collection="criteria.criteria" item="criterion" >
              <choose >
                <when test="criterion.noValue" >
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue" >
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue" >
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue" >
                  and ${criterion.condition}
                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List" >
    name, pass
  </sql>
  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.ceb.dgh.bo.DoorExample" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from door
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null" >
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select 
    <include refid="Base_Column_List" />
    from door
    where name = #{name,jdbcType=CHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
    delete from door
    where name = #{name,jdbcType=CHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.ceb.dgh.bo.DoorExample" >
    delete from door
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.ceb.dgh.bo.Door" >
    insert into door (name, pass)
    values (#{name,jdbcType=CHAR}, #{pass,jdbcType=CHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.ceb.dgh.bo.Door" >
    insert into door
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="name != null" >
        name,
      </if>
      <if test="pass != null" >
        pass,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="name != null" >
        #{name,jdbcType=CHAR},
      </if>
      <if test="pass != null" >
        #{pass,jdbcType=CHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.ceb.dgh.bo.DoorExample" resultType="java.lang.Integer" >
    select count(*) from door
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map" >
    update door
    <set >
      <if test="record.name != null" >
        name = #{record.name,jdbcType=CHAR},
      </if>
      <if test="record.pass != null" >
        pass = #{record.pass,jdbcType=CHAR},
      </if>
    </set>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map" >
    update door
    set name = #{record.name,jdbcType=CHAR},
      pass = #{record.pass,jdbcType=CHAR}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.ceb.dgh.bo.Door" >
    update door
    <set >
      <if test="pass != null" >
        pass = #{pass,jdbcType=CHAR},
      </if>
    </set>
    where name = #{name,jdbcType=CHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.ceb.dgh.bo.Door" >
    update door
    set pass = #{pass,jdbcType=CHAR}
    where name = #{name,jdbcType=CHAR}
  </update>
</mapper>

配置信息:

       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" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
  <display-name>SSM_Test</display-name>
  <!-- 设置欢迎页面 -->
  <welcome-file-list>
    <welcome-file>/WEB-INF/index.jsp</welcome-file>
  </welcome-file-list>

  <!-- 配置SpringMvc的前端控制器DispatcherServlet -->
  <servlet>
    <servlet-name>springmvc</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <!-- springmvc配置文件的位置 -->
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:springconfig.xml</param-value>
    </init-param>
  </servlet>
  
  <!--设置在jsp页面表单提交的action="*.action"行为 -->
  <servlet-mapping>
    <servlet-name>springmvc</servlet-name>
        <url-pattern>*.action</url-pattern>
		<url-pattern>*.js</url-pattern>
		<url-pattern>*.html</url-pattern>
	    <url-pattern>*.png</url-pattern>
		<url-pattern>*.css</url-pattern>
		<url-pattern>*.jpg</url-pattern>
		<url-pattern>*.jpeg</url-pattern>
		<url-pattern>*.txt</url-pattern>	
  </servlet-mapping> 

  <!-- post方式中文乱码过滤器 -->
  <filter>
    <filter-name>CharEncodingFilter</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>
  </filter>
  <filter-mapping>
    <filter-name>CharEncodingFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

</web-app>

springconfig.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:p="http://www.springframework.org/schema/p"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xmlns:task="http://www.springframework.org/schema/task"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans  
                        http://www.springframework.org/schema/beans/spring-beans.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
                        http://www.springframework.org/schema/task
                        http://www.springframework.org/schema/task/spring-task.xsd
                        http://www.springframework.org/schema/tx 
                        http://www.springframework.org/schema/tx/spring-tx.xsd"
                        default-lazy-init="true">


    <!-- 整合mybatis -->
    <!-- 加载db.properties包含数据库的连接信息 -->
    <context:property-placeholder location="classpath:db.properties"/>
    <!-- 配置数据源 -->
     <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
        destroy-method="close">
        <property name="driverClassName" value="${jdbc.driver}" />
        <property name="url" value="${jdbc.url}" />
        <property name="username" value="${jdbc.username}"></property>
        <property name="password" value="${jdbc.password}"></property>
        <!-- 连接池的最大数 -->
        <property name="maxActive" value="20"></property>
        <!-- 连接池最大空闲 -->
        <property name="maxIdle" value="20"></property>
    </bean> 
 
    
    <!-- 配置SqlSessionFactory -->
    <bean id="sqlSessionFactory" 
        class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource"></property>
        <!-- 指定要扫描的mapper.xml文件的位置 -->
        <property name="mapperLocations" 
           value="classpath:com/ceb/dgh/mapper/*.xml"></property>
    </bean>
    <!-- mapper扫描,扫描mapper接口类 -->
    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <property name="basePackage" value="com.ceb.dgh.mapper"></property>
        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property>
    </bean>

    <!-- 启动包的扫描功能,@controller等注解 -->
    <context:component-scan base-package="com.test"></context:component-scan>

    <!-- 模型视图的解析,请求逻辑视图名,添加前后缀 -->
    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="prefix" value="/WEB-INF/jsp/"></property>
        <!-- <property name="suffix" value=".jsp"></property> -->
        <property name="suffix" value=".jsp"></property>
    </bean>

    <!-- 事务管理 -->
    <bean id="transactionManager"
        class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <property name="dataSource" ref="dataSource"></property>
    </bean>
    <!-- 支持@Transactional注解 -->
    <tx:annotation-driven transaction-manager="transactionManager"/>
    
	<!-- 静态资源处理器 -->
	<mvc:resources location="/images/" mapping="/images/**" />
	<mvc:resources location="/js/" mapping="/js/**" />
	<mvc:resources mapping="/html/**" location="/html/" />
    <mvc:annotation-driven />


	

</beans>

创建jsp页面:

index.jsp

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>首页</title>
</head>
<body>
	<form action="door/open.action" method="post">
		<div class="login">
			<dl>
				<dt class="blues">开门密码搜索</dt>
				<dd>
					<label for="name">门名:</label> <input type="text" name="name"
						class="inputh" value="${name}" id="name" />
				</dd>
				<dd class="buttom">
					<input name="" type="submit" value="走 你"  />
					<div class="cl"></div>
				</dd>
			</dl>
		</div>
	</form>
</body>
</html>

result.jsp

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>响应页面</title>
</head>
<body>
	<form action="" method="post">
		<div class="login">
			<dl>
				<dt >开门密码</dt>
				<dd><a>门名: ${name}</a>
				</dd>
				<dd >
					<a>密码: ${pass}</a>
				</dd>
			</dl>
		</div>
	</form>
</body>
</html>

 

测试:

运行成功,输入框输入:月光宝盒,点击“走你”。

响应结果:

日志:

[2019-03-16 01:06:18,001] [INFO] [org.springframework.web.servlet.DispatcherServlet.initServletBean:484] - FrameworkServlet 'springmvc': initialization started
[2019-03-16 01:06:18,044] [INFO] [org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh:510] - Refreshing WebApplicationContext for namespace 'springmvc-servlet': startup date [Sat Mar 16 01:06:18 CST 2019]; root of context hierarchy
[2019-03-16 01:06:18,083] [INFO] [org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions:317] - Loading XML bean definitions from class path resource [springconfig.xml]
[2019-03-16 01:06:18,520] [INFO] [org.springframework.context.support.PropertySourcesPlaceholderConfigurer.loadProperties:172] - Loading properties file from class path resource [db.properties]
[2019-03-16 01:06:18,703] [INFO] [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.registerHandler:314] - Mapped URL path [/images/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
[2019-03-16 01:06:18,990] [INFO] [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.registerHandler:314] - Mapped URL path [/js/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#1'
[2019-03-16 01:06:18,994] [INFO] [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.registerHandler:314] - Mapped URL path [/html/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#2'
[2019-03-16 01:06:19,029] [INFO] [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod:220] - Mapped "{[/door/open],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.test.controller.DoorController.login(com.ceb.dgh.bo.Door,org.springframework.ui.Model) throws java.net.UnknownHostException
[2019-03-16 01:06:19,079] [INFO] [org.hibernate.validator.internal.util.Version.<clinit>:17] - HV000001: Hibernate Validator 5.2.2.Final
[2019-03-16 01:06:19,501] [INFO] [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.initControllerAdviceCache:518] - Looking for @ControllerAdvice: WebApplicationContext for namespace 'springmvc-servlet': startup date [Sat Mar 16 01:06:18 CST 2019]; root of context hierarchy
[2019-03-16 01:06:19,626] [INFO] [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.initControllerAdviceCache:518] - Looking for @ControllerAdvice: WebApplicationContext for namespace 'springmvc-servlet': startup date [Sat Mar 16 01:06:18 CST 2019]; root of context hierarchy
[2019-03-16 01:06:19,768] [INFO] [org.springframework.web.servlet.DispatcherServlet.initServletBean:503] - FrameworkServlet 'springmvc': initialization completed in 1751 ms
[2019-03-16 01:06:19,854] [INFO] [com.test.controller.DoorController.login:24] - 进入控制器door/open,参数:Door [name=月光宝盒, pass=null]
[2019-03-16 01:06:20,091] [INFO] [com.test.controller.DoorController.DoOpen:23] - 进入业务层DoOpen方法
Door:Door [name=月光宝盒, pass=菠萝菠萝蜜]

 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值