SSM整合,字节跳动java面试题数据结构与算法
2021/12/7 17:21:14
本文主要是介绍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
/*
这篇关于SSM整合,字节跳动java面试题数据结构与算法的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-10-01基于Python+Vue开发的医院门诊预约挂号系统
- 2024-10-01基于Python+Vue开发的旅游景区管理系统
- 2024-10-01RestfulAPI入门指南:打造简单易懂的API接口
- 2024-10-01初学者指南:了解和使用Server Action
- 2024-10-01Server Component入门指南:搭建与配置详解
- 2024-10-01React 中使用 useRequest 实现数据请求
- 2024-10-01使用 golang 将ETH账户的资产平均分散到其他账户
- 2024-10-01JWT用户校验课程:从入门到实践
- 2024-10-01Server Component课程入门指南
- 2024-09-30Dnd-Kit学习:新手快速入门指南