当前位置:网站首页>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操作
边栏推荐
猜你喜欢
随机推荐
淘宝商品详情又见淘宝详情,升级高级版 API
zip package all files in the directory (including hidden files/folders)
VoLTE Basic Learning Series | Enterprise Voice Network Brief
STM32个人笔记-看门狗
sqlserver 对比两张表的差异
2022.7.31-----leetcode.1161
【应用推荐】常见资源管理器整理,含个人使用体验和产品选型推荐
用OpenCV的边缘检测
最新的Cesium和Three的整合方法(附完整代码)
安装GBase 8c数据库的时候,报错显示“Resource,如何解决?
正则表达式符号
Redis middleware (from building to refuse pit)
leetcode-6133: maximum number of groupings
实验。。。。
Shell:条件测试操作
自定义IP在PCIE中使用
网络基础学习
毕业论文写作技巧
Microsoft Azure & NVIDIA IoT 开发者季 I|Azure IoT & NVIDIA Jetson 开发基础
Chapters 6 and 7 of Huawei Deep Learning Course