# v5ba-parent **Repository Path**: v5ba/v5ba-parent ## Basic Information - **Project Name**: v5ba-parent - **Description**: No description available - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-02-16 - **Last Updated**: 2025-12-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # v5ba-parent 本项目包含以下子项目,每个子项目可以单独使用 * v5ba-common: * 全局异常处理 * 全局返回处理 * 注解 * @Dict * @Fen2Yuan * @Header * @NoLoginRequired * @OpenAPI * Url * v5ba-mybatis-plus * mysql * mybatis-plus * 登录拦截器 * Swagger * 系统相关接口:用户、工具 * v5ba-mybatis-plus-generator ## 一、使用说明 先将项目下载到本地并执行install,然后创建 springboot 项目(版本是:2.7.x,jdk:17) ### 1.1 使用 v5ba-common 项目 第一步:添加依赖包 ``` com.v5ba v5ba-common 1.0.0 org.springframework.boot spring-boot-starter-test test ``` 第二步:增加注解,可以在启动类也可以在其它配置类 ```java @SpringBootApplication @EnableV5baCommonConfig public class ServerRunApplication { public static void main(String[] args) { SpringApplication.run(ServerRunApplication.class, args); } } ``` 第三步:可选配置 ```yaml v5ba: mount: value: /root/data # 系统真实路径(默认值:/root/data) mapping: /data # 映射路径/虚拟路径(默认值:/data) openapi: privateKey: 1111111 # 私钥用于解密 publicKey: 22222222 # 公钥用于加密 url: webUrl: http://127.0.0.1:8080 # 前端域名 fileUrl: http://127.0.0.1:8080 # 文件访问域名 weixin: gzh: # 公众号 appid: appid111111 account: gh_7981111111 secret: 46cbcf6bd8db9f8 token: 123456aaabbb ``` ### 1.2 使用 v5ba-mybatis-plus 项目 第一步:添加依赖包 ``` com.v5ba v5ba-mybatis-plus 1.0.0 org.springframework.boot spring-boot-starter-test test ``` 第二步:增加注解,可以在启动类也可以在其它配置类 ```java @SpringBootApplication @EnableV5baMyBatisConfig public class ServerRunApplication { public static void main(String[] args) { SpringApplication.run(ServerRunApplication.class, args); } } ``` 第三步:配置属性 数据库是必须添加的配置,其他属性参考v5ba-common配置 ```yaml spring: datasource: url: jdbc:mysql://127.0.0.1:3306/v5ba?useUnicode=true&useSSL=false&characterEncoding=utf-8 username: root password: 123456 driver-class-name: com.mysql.jdbc.Driver tomcat: max-idle: 10 max-wait: 10000 min-idle: 1 initial-size: 1 validation-query: SELECT 1 test-on-borrow: false test-while-idle: true time-between-eviction-runs-millis: 18800 jdbc-interceptors: ConnectionState;SlowQueryReport(threshold=0) jpa: show-sql: true database-platform: org.hibernate.dialect.MySQL5Dialect hibernate: ddl-auto: none ```