当前位置:网站首页>Change Servlet project to SSM project
Change Servlet project to SSM project
2022-08-01 09:24:00 【Ultimate Chiba】
目录
将Servlet项目改为SSM(Spring Boot+Spring MVC+MyBATIS)项目.
1.先创建SSM项目.



2.Set up profiles for different platforms
2.1.Create profiles for different platforms
要求:The configuration file format for different platforms must conform to the specification.
2.2.在主配置文件中(application.yml)The runtime platform of the configuration project in
spring:
profiles:
active: dev
This can be done.
3.Configure the connected database and MyBatis 存储 xml 的路径
#开发环境的配置文件
spring:
datasource:
url: jdbc:mysql://127.0.0.1:3306/myblog2022?characterEncoding=utf8&useSSL=true
username: root
password: 12345678
driver-class-name: com.mysql.cj.jdbc.Driver
#生产环境的配置文件
spring:
datasource:
url: jdbc:mysql://121.5.240.34:3306/myblog2022?characterEncoding=utf8&useSSL=true
username: root
password: 12345678
driver-class-name: com.mysql.cj.jdbc.Driver
主配置文件:
#配置mybatis xml保存路径
mybatis:
mapper-locations: classpath:mybatis/**Mapper.xml 4.将servletAll front-end pages in ssm项目中的static目录中
5.Retrofit to implement business interface
重点操作MyBatis,
Manipulate two files:xxxMapper.java 的接口声明、xxxMapper.xml 实现SQL操作
边栏推荐
- 高级驾驶辅助系统ADAS简介
- YOLOv7-Pose尝鲜,基于YOLOv7的关键点模型测评
- Lsky Pro 企业版手动升级、优化教程
- Go-Excelize API源码阅读(八)——GroupSheets(sheets []string)、UngroupSheets()
- Centos install php7.4, build hyperf, forward RDS
- node 格式化时间的传统做法与高级做法(moment)
- 安装GBase 8c数据库的时候,报错显示“Resource,如何解决?
- UXDB如何返回当前数据库所有表的记录数?
- 最新的Cesium和Three的整合方法(附完整代码)
- Chapter 9 of Huawei Deep Learning Course - Convolutional Neural Network and Case Practice
猜你喜欢

报告:想学AI的学生数量已涨200%,老师都不够用了

CTO强烈禁止使用Calendar,那用啥?

【STM32】入门(二):跑马灯-GPIO端口输出控制

XX市消防救援指挥中心实战指挥平台多链路聚合解决方案实例
![[Tear AHB-APB Bridge by hand]~ Why aren't the lower two bits of the AHB address bus used to represent the address?](/img/fb/c95c5857024db001638cd484c5e78f.png)
[Tear AHB-APB Bridge by hand]~ Why aren't the lower two bits of the AHB address bus used to represent the address?
![ASP.NET Core 6框架揭秘实例演示[30]:利用路由开发REST API](/img/b3/0167c22f14b97eb0206696495af7b5.png)
ASP.NET Core 6框架揭秘实例演示[30]:利用路由开发REST API

Redis中间件(从搭建到弃坑)

程序员如何学习开源项目,这篇文章告诉你
Get the Token from the revised version of Qubutu Bed

HoloView——实时数据
随机推荐
常见的API安全缺陷有哪些?
【应用推荐】常见资源管理器整理,含个人使用体验和产品选型推荐
Is the real database data of TiDB stored in kv and pd?
leetcode-6134: Find the closest node to the given two nodes
pytest interface automation testing framework | skip test classes
指针的介绍及应用
Data Analysis 5
获取页面数据的方法
pytest interface automation testing framework | pass in parameter values in the form of function return values
STM32个人笔记-看门狗
STM32个人笔记-嵌入式C语言优化
Prime Ring Problem
node 格式化时间的传统做法与高级做法(moment)
372. 超级次方
消息队列面试题(2022最新整理)
[Beyond programming] When the fig leaf is lifted, when people begin to accept everything
Ogg synchronizes oracle to mysql, there may be characters that need to be escaped in the field, how to configure escape?
HoloView -- Tabular Datasets
opencv创建窗口—cv.namedWindow()
Intensive reading of ACmix papers, and analysis of its model structure