SSM整合,字节跳动java面试题数据结构与算法

com.alibaba

druid

1.1.22

<group

《一线大厂Java面试题解析+后端开发学习笔记+最新架构讲解视频+实战项目源码讲义》

【docs.qq.com/doc/DSmxTbFJ1cmN1R2dB】 完整内容开源分享

Id>mysql

mysql-connector-java

5.1.47

5.日志相关jar包

log4j

log4j

1.2.17

org.slf4j

slf4j-api

1.7.10

org.slf4j

slf4j-log4j12

1.7.10

6.测试相关jar包

junit

junit

4.12

test

二、配置文件


1.spring整合mybatis spring-mybatis.xml
jdbc.properties

jdbc.driverClassName=com.mysql.jdbc.Driver

jdbc.url=jdbc:mysql://localhost:3306/videos?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8

jdbc.username=root

jdbc.password=123456

initialSize=5

maxActive=20

maxWait=2000

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:context=“http://www.springframework.org/schema/context”

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/tx

http://www.springframework.org/schema/tx/spring-tx.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context.xsd">

<context:component-scan base-package=“com.liubo.SSMTemplate.service”/>

<context:property-placeholder location=“classpath:jdbc.properties”/>

<tx:annotation-driven transaction-manager=“transactionManager”/>

2.springMVC配置文件
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: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/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">

<context:component-scan base-package=“com.liubo.SSMTemplate.controller”/>

mvc:default-servlet-handler/

mvc:annotation-driven/

mvc:interceptors

mvc:interceptor

<mvc:mapping path="/video/*"/>

<mvc:mapping path="/speaker/*"/>

<mvc:mapping path="/course/*"/>

</mvc:interceptor>

</mvc:interceptors>

3.mybatis配置文件
mybatis-config.xml

此文件多用与配置一些在spring-mybatis文件中不方便配置的东西

<?xml version="1.0" encoding="UTF-8"?>

4.web.xml 的配置
<?xml version="1.0" encoding="UTF-8"?>

<web-app version=“3.0” xmlns=“http://java.sun.com/xml/ns/javaee”

xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

Archetype Created Web Application

contextConfigLocation

classpath:spring-*.xml

log4jConfigLocation

classpath:log4j.properties

org.springframework.web.context.ContextLoaderListener

dispatcherServlet

org.springframework.web.servlet.DispatcherServlet

contextConfigLocation

classpath:springmvc.xml

1

dispatcherServlet

/

characterEncodingFilter

org.springframework.web.filter.CharacterEncodingFilter

encoding

UTF-8

characterEncodingFilter

/*

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值