当前位置:网站首页>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操作
边栏推荐
- STM32个人笔记-嵌入式C语言优化
- leetcode-6135:图中的最长环
- Redis learning
- HoloView--live data
- PerViT: 神经网络也能像人类利用外围视觉一样观察图像!
- AC与瘦AP的WLAN组网实验
- STM32个人笔记-程序跑飞
- GBase 8s 锁分类
- 22 Grab the Seat 1 C.Grab the Seat (Geometry + Violence)
- pytest interface automation testing framework | pass in parameter values in the form of function return values
猜你喜欢

【STM32】入门(二):跑马灯-GPIO端口输出控制
Get the Token from the revised version of Qubutu Bed

【编程之外】当遮羞布被掀开,当人们开始接受一切

【STM32】入门(一):环境搭建、编译、下载、运行

HoloView -- Tabular Datasets

力扣周赛304 6135. 图中的最长环 内向基环树

leetcode-6134:找到离给定两个节点最近的节点

sqlserver怎么查询一张表中同人员的交叉日期
![[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?

HoloView -- Tabular Datasets
随机推荐
22 Grab the Seat 1 C.Grab the Seat (Geometry + Violence)
Is the real database data of TiDB stored in kv and pd?
走进音视频的世界——mp3封装格式
2022.7.31-----leetcode.1161
Chapter 9 of Huawei Deep Learning Course - Convolutional Neural Network and Case Practice
Pod环境变量和initContainer
How to query database configuration parameters in GBase 8c, such as datestyle
【无标题】
STM32个人笔记-程序跑飞
Lsky Pro 企业版手动升级、优化教程
C语言中编译时出现警告C4013(C语言不加函数原型产生的潜在错误)
Idea 常用插件
优炫数据库支持Oracle哪几种时间及日期类型
[Dataset] Dataset summary of various insulators, bird's nests and anti-vibration hammers
Install GBase 8 c database, the error shows "Resource, how to solve?
372. 超级次方
笔记。。。。
如何保证数据库与缓存数据一致性?
JVM 运行时数据区与JMM 内存模型详解
Microsoft Azure & NVIDIA IoT 开发者季 I|Azure IoT & NVIDIA Jetson 开发基础