金融信贷:springboot整合Mybatis

在这里插入图片描述在这里插入图片描述在这里插入图片描述

Main中引入admin

  <artifactId>maim</artifactId>
    <packaging>jar</packaging>
    <dependencies>
        <!--引入admin-->
        <dependency>
            <groupId>org.example</groupId>
            <artifactId>admin</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
    </dependencies>

Admin中引入Framework

<artifactId>admin</artifactId>
<packaging>jar</packaging>
<dependencies>
    <!--引入franework-->
    <dependency>
        <groupId>org.example</groupId>
        <artifactId>framework</artifactId>
        <version>1.0-SNAPSHOT</version>
    </dependency>
</dependencies>

标题导入父依赖:

<parent>
    <artifactId>spring-boot-starter-parent</artifactId>
    <groupId>org.springframework.boot</groupId>
    <version>2.4.4</version>
</parent>
    <dependencies>
        <!--springboot-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
    </dependencies>

配置启动类和配置文件

在main的resouces中新建application.yml
更改tomcat默认端口
在这里插入图片描述
配置文件的写法在这里插入图片描述

server:
  port: 9999
  
spring:
  application:
    name: financial_credit

组件扫描的路径:
在这里插入图片描述
主启动类:
在这里插入图片描述

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class MainApplication {
    public static  void  main(String[] args){
        SpringApplication.run(MainApplication.class,args);
    }
}

测试后台接口

    # swagger--ui

导入依赖:–>父项目

<!--swagger-ui-->
        <dependency>
            <groupId>com.spring4all</groupId>
            <artifactId>swagger-spring-boot-starter</artifactId>
            <version>1.9.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>com.github.xiaoymin</groupId>
            <artifactId>swagger-bootstrap-ui</artifactId>
            <version>1.9.6</version>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
        </dependenc
  • 22
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值