first commit

This commit is contained in:
2023-04-26 19:48:44 +08:00
commit 6adac3aeb1
62 changed files with 2741 additions and 0 deletions

View File

@ -0,0 +1,26 @@
package com.qiaoba.application;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
/**
* 启动类
*
* @author ailanyin
* @version 1.0
* @date 1/29/23 10:44 AM
*/
@EnableScheduling
@ComponentScan({"com.qiaoba.module.**", "com.qiaoba.application"})
@MapperScan("com.qiaoba.module.**.mapper")
@SpringBootApplication
public class QiaoBaApplication {
public static void main(String[] args) {
SpringApplication.run(QiaoBaApplication.class, args);
}
}

View File

@ -0,0 +1,37 @@
package com.qiaoba.application.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
/**
* 全局跨域配置
*
* @author ailanyin
* @version 1.0
* @since 2021/10/15 0015 下午 16:43
*/
@Configuration
public class GlobalCorsConfig {
@Bean
public CorsFilter corsFilter() {
CorsConfiguration config = new CorsConfiguration();
config.setAllowCredentials(true);
// 设置访问源地址
config.addAllowedOriginPattern("*");
// 设置访问源请求头
config.addAllowedHeader("*");
// 设置访问源请求方法
config.addAllowedMethod("*");
// 有效期 半小时
config.setMaxAge(1800L);
// 添加映射路径,拦截一切请求
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**" , config);
// 返回新的CorsFilter
return new CorsFilter(source);
}
}

View File

@ -0,0 +1,11 @@
spring:
datasource:
url: jdbc:mysql://121.5.136.69:3306/qiaoba-boot?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowMultiQueries=true
username: root
password: LpYN7LUoL?l0OSpR2
type: com.alibaba.druid.pool.DruidDataSource
druid:
initial-size: 5 #连接池初始化大小
min-idle: 10 #最小空闲连接数
max-active: 20 #最大连接数

View File

@ -0,0 +1,40 @@
server:
port: 80
spring:
application:
name: qiaoba-boot
profiles:
active: dev
servlet:
multipart:
enabled: true #开启文件上传
max-file-size: 200MB #限制文件上传大小为10M
max-request-size: 200MB #限制文件上传大小为10M
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
main:
allow-bean-definition-overriding: true
# springdoc-openapi项目配置
springdoc:
swagger-ui:
path: /swagger-ui.html
tags-sorter: alpha
operations-sorter: alpha
api-docs:
path: /v3/api-docs
group-configs:
- group: '系统管理'
paths-to-match: '/**'
packages-to-scan: com.qiaoba.module.system.controller
# knife4j的增强配置不需要增强可以不配
knife4j:
enable: true
setting:
language: zh_cn
enable-swagger-models: false
enable-footer-custom: true
footer-custom-content: create by ailanyin

View File

@ -0,0 +1 @@
null not found