参考:https://blog.csdn.net/u012075383/article/details/79304178
1.项目整体结构:
2.项目运行测试:
3.pom.xml文件:
4.0.0
org.springframework.boot
spring-boot-starter-parent
2.1.4.RELEASE
com.xxxx
meeting
0.0.1-SNAPSHOT
meeting
Demo project for Spring Boot
1.8
org.springframework.boot
spring-boot-starter
org.springframework.boot
spring-boot-starter-test
test
org.springframework.boot
spring-boot-starter-web
mysql
mysql-connector-java
runtime
com.baomidou
mybatis-plus-boot-starter
3.0.5
com.baomidou
mybatis-plus
3.0.5
org.projectlombok
lombok
1.18.0
com.alibaba
fastjson
1.2.15
com.alibaba
druid-spring-boot-starter
1.1.10
com.oracle
ojdbc6
11.2.0.3
org.springframework.boot
spring-boot-starter-aop
com.google.guava
guava
23.6-jre
org.springframework.boot
spring-boot-maven-plugin
4.application.yml文件:
server:
port: 9002
servlet:
context-path: /meeting
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
druid:
db1:
url: jdbc:mysql://localhost:3306/meeting?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&useSSL=true
username: root
password: root
driverClassName: com.mysql.cj.jdbc.Driver
db2:
url: jdbc:oracle:thin:@xxx.xxx.xx.xxx:xxxx:数据库名字
username: test
password: 123456
driverClassName: oracle.jdbc.driver.OracleDriver
5.启动类:MeetingApplication
@SpringBootApplication
@MapperScan("com.xxxx.meeting.mapper")
public class MeetingApplication {
public static void main(String[] args) {
SpringApplication.run(MeetingApplication.class, args);
}
}
6.