当前位置:网站首页>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操作
边栏推荐
- 热修复技术可谓是百花齐放
- sqlserver怎么查询一张表中同人员的交叉日期
- Data Analysis 5
- zip package all files in the directory (including hidden files/folders)
- HoloView--Customization
- pytest interface automation testing framework | skip test classes
- Microsoft Azure & NVIDIA IoT developers season I | Azure IoT & NVIDIA Jetson development foundation
- 笔记。。。。
- scrapy爬虫框架的使用
- JVM内存模型之深究模型特征
猜你喜欢

XX市消防救援指挥中心实战指挥平台多链路聚合解决方案实例

Leicester Weekly 304 6135. The longest ring in the picture Inward base ring tree

Idea 常用插件

【无标题】

leetcode-6133:分组的最大数量

2022杭电中超杯(1)个人题解

Shell:条件测试操作

Microsoft Azure & NVIDIA IoT developers season I | Azure IoT & NVIDIA Jetson development foundation

Intensive reading of ACmix papers, and analysis of its model structure

The soul asks: How does MySQL solve phantom reads?
随机推荐
Data Analysis 5
Manual upgrade and optimization tutorial of Lsky Pro Enterprise Edition
【Untitled】
Analysis of High Availability Solution Based on MySql, Redis, Mq, ES
笔记。。。。
179. 最大数
Custom IP used in PCIE
STM32个人笔记-嵌入式C语言优化
实验。。。。
A problem with writing to the database after PHP gets the timestamp
ACmix 论文精读,并解析其模型结构
2022.7.31-----leetcode.1161
指针的介绍及应用
Flink SQL - client, how to deal with the source side and to increase the target, the SQL - client including mapping table and the JOB such as
【数据集】各类绝缘子、鸟巢及防震锤数据集汇总
Pod环境变量和initContainer
用OpenCV的边缘检测
Idea 常用插件
Get the Token from the revised version of Qubutu Bed
sql server, FULL mode, dbcc shrinkfile(2,1) can not shrink the transaction log, or the original size, why?