当前位置:网站首页>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操作
边栏推荐
- Pod环境变量和initContainer
- 【应用推荐】常见资源管理器整理,含个人使用体验和产品选型推荐
- Static Pod, Pod Creation Process, Container Resource Limits
- 程序员如何学习开源项目,这篇文章告诉你
- 22 Grab the Seat 1 C.Grab the Seat (Geometry + Violence)
- leetcode-6134: Find the closest node to the given two nodes
- 三子棋(C语言实现)
- 【Unity3D】相机
- Is the real database data of TiDB stored in kv and pd?
- 【Untitled】
猜你喜欢
随机推荐
GBase 8s 锁分类
navicat mysql 内存占用过高,被强制关闭
Static Pod, Pod Creation Process, Container Resource Limits
Shell:条件测试操作
MySQL query advanced - from the use of functions to table joins, do you remember?
TiDB的真实数据库数据是存在kv和还是pd上?
将aof文件转换为命令waoffle安装和使用
基于tika实现对文件类型进行判断
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
rpm和yum
Ogg synchronizes oracle to mysql, there may be characters that need to be escaped in the field, how to configure escape?
Classify GBase 8 s lock
HoloView--Customization
HoloView -- Tabular Datasets
Prime Ring Problem
ASP.NET Core 6框架揭秘实例演示[30]:利用路由开发REST API
笔记。。。。
会议OA(待开会议&所有会议)
The socket option
STM32个人笔记-程序跑飞









