当前位置:网站首页>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操作
边栏推荐
- Gethostbyname \ getaddrinfo DNS domain name IP address is not safe
- MySQL query advanced - from the use of functions to table joins, do you remember?
- 【面试:并发篇39:多线程:线程池】ThreadPoolExecutor类-提交、停止
- SAP ABAP ALV+SMARTFORS 表分页 报表打印程序
- SkiaSharp's WPF self-painted five-ring bouncing ball (case version)
- 灵魂发问:MySQL是如何解决幻读的?
- Leetcode - 6135: the longest part of the figure
- Mysql database deployment and initialization steps
- A problem with writing to the database after PHP gets the timestamp
- 常见的API安全缺陷有哪些?
猜你喜欢

Idea 常用插件

Case practice --- Resnet classic convolutional neural network (Mindspore)

获取页面数据的方法

Chapters 6 and 7 of Huawei Deep Learning Course

灵魂发问:MySQL是如何解决幻读的?

Microsoft Azure & NVIDIA IoT 开发者季 I|Azure IoT & NVIDIA Jetson 开发基础

基于MySql,Redis,Mq,ES的高可用方案解析
![[Beyond programming] When the fig leaf is lifted, when people begin to accept everything](/img/e1/ff8d416c99e1f370d73b9520654ddf.jpg)
[Beyond programming] When the fig leaf is lifted, when people begin to accept everything

BGP综合实验

《时代》杂志:元宇宙时代将改变世界
随机推荐
三子棋(C语言实现)
【STM32】入门(一):环境搭建、编译、下载、运行
Get the Token from the revised version of Qubutu Bed
实验。。。。
net stop/start mysql80 access denied
网络个各种协议
Prime Ring Problem(素数环问题)
朴素贝叶斯--学习笔记--基本原理及代码实现
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
Redis学习
Parsing MySQL Databases: "SQL Optimization" vs. "Index Optimization"
MySQL query advanced - from the use of functions to table joins, do you remember?
PerViT: 神经网络也能像人类利用外围视觉一样观察图像!
将aof文件转换为命令waoffle安装和使用
ASP.NET Core 6框架揭秘实例演示[30]:利用路由开发REST API
Detailed explanation of JVM runtime data area and JMM memory model
力扣周赛304 6135. 图中的最长环 内向基环树
TiDB的真实数据库数据是存在kv和还是pd上?
笔记。。。。
企业数据虚拟化综合指南