dev #1
|
@ -14,6 +14,7 @@
|
||||||
<file url="file://$PROJECT_DIR$/model/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/model/src/main/resources" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/model/src/main/resources-filtered" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/model/src/main/resources-filtered" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/service/service-acl/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/service/service-acl/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/service/service-product/src/main/java" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/service/service-sys/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/service/service-sys/src/main/java" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/service/src/main/java" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/service/src/main/java" charset="UTF-8" />
|
||||||
<file url="file://$PROJECT_DIR$/service/src/main/resources" charset="UTF-8" />
|
<file url="file://$PROJECT_DIR$/service/src/main/resources" charset="UTF-8" />
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_18" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -17,16 +17,16 @@ public class CodeGet {
|
||||||
// 2、全局配置
|
// 2、全局配置
|
||||||
// 全局配置
|
// 全局配置
|
||||||
GlobalConfig gc = new GlobalConfig();
|
GlobalConfig gc = new GlobalConfig();
|
||||||
gc.setOutputDir("F:\\File\\Java\\ssyx\\guigu-ssyx-parent\\service\\service-sys" + "/src/main/java\\com\\atguigu\\ssyx\\sys");
|
gc.setOutputDir("F:\\File\\Java\\ssyx\\guigu-ssyx-parent\\service\\service-product" + "/src/main/java");
|
||||||
|
|
||||||
gc.setServiceName("%sService"); // 去掉Service接口的首字母I
|
gc.setServiceName("%sService"); // 去掉Service接口的首字母I
|
||||||
gc.setAuthor("atguigu");
|
gc.setAuthor("bunny");
|
||||||
gc.setOpen(false);
|
gc.setOpen(false);
|
||||||
mpg.setGlobalConfig(gc);
|
mpg.setGlobalConfig(gc);
|
||||||
|
|
||||||
// 3、数据源配置
|
// 3、数据源配置
|
||||||
DataSourceConfig dsc = new DataSourceConfig();
|
DataSourceConfig dsc = new DataSourceConfig();
|
||||||
dsc.setUrl("jdbc:mysql://106.15.251.123:3305/shequ-sys?serverTimezone=GMT%2B8&useSSL=false&characterEncoding=utf-8&allowPublicKeyRetrieval=true");
|
dsc.setUrl("jdbc:mysql://106.15.251.123:3305/shequ-product?serverTimezone=GMT%2B8&useSSL=false&characterEncoding=utf-8&allowPublicKeyRetrieval=true");
|
||||||
dsc.setDriverName("com.mysql.cj.jdbc.Driver");
|
dsc.setDriverName("com.mysql.cj.jdbc.Driver");
|
||||||
dsc.setUsername("root");
|
dsc.setUsername("root");
|
||||||
dsc.setPassword("02120212");
|
dsc.setPassword("02120212");
|
||||||
|
@ -35,8 +35,8 @@ public class CodeGet {
|
||||||
|
|
||||||
// 4、包配置
|
// 4、包配置
|
||||||
PackageConfig pc = new PackageConfig();
|
PackageConfig pc = new PackageConfig();
|
||||||
pc.setParent("com.atguigu");
|
pc.setParent("com.atguigu.ssyx");
|
||||||
pc.setModuleName("system"); // 模块名
|
pc.setModuleName("product"); // 模块名
|
||||||
pc.setController("controller");
|
pc.setController("controller");
|
||||||
pc.setService("service");
|
pc.setService("service");
|
||||||
pc.setMapper("mapper");
|
pc.setMapper("mapper");
|
||||||
|
@ -45,7 +45,8 @@ public class CodeGet {
|
||||||
// 5、策略配置
|
// 5、策略配置
|
||||||
StrategyConfig strategy = new StrategyConfig();
|
StrategyConfig strategy = new StrategyConfig();
|
||||||
|
|
||||||
strategy.setInclude("region", "region_ware", "ware");
|
strategy.setInclude("attr", "attr_group", "base_category_trademark", "category", "comment", "comment_replay", "mq_repeat_record",
|
||||||
|
"region_ware", "sku_attr_value", "sku_detail", "sku_image", "sku_info", "sku_poster", "sku_stock_history", "ware");
|
||||||
strategy.setNaming(NamingStrategy.underline_to_camel);// 数据库表映射到实体的命名策略
|
strategy.setNaming(NamingStrategy.underline_to_camel);// 数据库表映射到实体的命名策略
|
||||||
strategy.setColumnNaming(NamingStrategy.underline_to_camel);// 数据库表字段映射到实体的命名策略
|
strategy.setColumnNaming(NamingStrategy.underline_to_camel);// 数据库表字段映射到实体的命名策略
|
||||||
strategy.setEntityLombokModel(true); // lombok 模型 @Accessors(chain = true) setter链式操作
|
strategy.setEntityLombokModel(true); // lombok 模型 @Accessors(chain = true) setter链式操作
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<modules>
|
<modules>
|
||||||
<module>service-acl</module>
|
<module>service-acl</module>
|
||||||
<module>service-sys</module>
|
<module>service-sys</module>
|
||||||
|
<module>service-product</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.atguigu</groupId>
|
||||||
|
<artifactId>service</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>service-product</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>service-product</name>
|
||||||
|
<url>https://maven.apache.org</url>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.atguigu.ssyx.product;
|
||||||
|
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
@ComponentScan(basePackages = {"com.atguigu.ssyx"})
|
||||||
|
@EnableTransactionManagement
|
||||||
|
public class ServiceProductApplication {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(ServiceProductApplication.class, args);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,54 @@
|
||||||
|
package com.atguigu.ssyx.product.config;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import springfox.documentation.builders.ApiInfoBuilder;
|
||||||
|
import springfox.documentation.builders.ParameterBuilder;
|
||||||
|
import springfox.documentation.builders.PathSelectors;
|
||||||
|
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||||
|
import springfox.documentation.schema.ModelRef;
|
||||||
|
import springfox.documentation.service.ApiInfo;
|
||||||
|
import springfox.documentation.service.Contact;
|
||||||
|
import springfox.documentation.service.Parameter;
|
||||||
|
import springfox.documentation.spi.DocumentationType;
|
||||||
|
import springfox.documentation.spring.web.plugins.Docket;
|
||||||
|
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@EnableSwagger2WebMvc
|
||||||
|
public class Knife4jConfig {
|
||||||
|
@Bean
|
||||||
|
public Docket adminApiConfig() {
|
||||||
|
List<Parameter> pars = new ArrayList<>();
|
||||||
|
ParameterBuilder tokenPar = new ParameterBuilder();
|
||||||
|
tokenPar.name("adminId")
|
||||||
|
.description("用户token")
|
||||||
|
.defaultValue("1")
|
||||||
|
.modelRef(new ModelRef("string"))
|
||||||
|
.parameterType("header")
|
||||||
|
.required(false)
|
||||||
|
.build();
|
||||||
|
pars.add(tokenPar.build());
|
||||||
|
|
||||||
|
return new Docket(DocumentationType.SWAGGER_2)
|
||||||
|
.groupName("adminApi")
|
||||||
|
.apiInfo(adminApiInfo())
|
||||||
|
.select()
|
||||||
|
.apis(RequestHandlerSelectors.basePackage("com.atguigu.ssyx.product.controller"))
|
||||||
|
.paths(PathSelectors.regex("/admin/.*"))
|
||||||
|
.build()
|
||||||
|
.globalOperationParameters(pars);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ApiInfo adminApiInfo() {
|
||||||
|
return new ApiInfoBuilder()
|
||||||
|
.title("后台管理系统-API文档")
|
||||||
|
.description("本文档描述了尚上优选后台系统服务接口定义")
|
||||||
|
.version("1.0")
|
||||||
|
.contact(new Contact("atguigu", "http://atguigu.com", "atguigu"))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
server:
|
||||||
|
port: 8203
|
||||||
|
|
||||||
|
bunny:
|
||||||
|
datasource:
|
||||||
|
host: 106.15.251.123
|
||||||
|
port: 3305
|
||||||
|
sqlData: shequ-product
|
||||||
|
username: root
|
||||||
|
password: "02120212"
|
||||||
|
|
||||||
|
nacos:
|
||||||
|
server-addr: z-bunny.cn:8848
|
||||||
|
discovery:
|
||||||
|
namespace: ssyx
|
||||||
|
|
||||||
|
redis:
|
||||||
|
host: 47.120.65.66
|
||||||
|
port: 6379
|
||||||
|
database: 2
|
||||||
|
password: "02120212"
|
||||||
|
|
||||||
|
minio:
|
||||||
|
endpointUrl: "http://129.211.31.58:9000"
|
||||||
|
bucket-name: ssyx
|
||||||
|
accessKey: bunny
|
||||||
|
secretKey: "02120212"
|
|
@ -0,0 +1,62 @@
|
||||||
|
server:
|
||||||
|
port: 8203
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: service-product
|
||||||
|
profiles:
|
||||||
|
active: dev
|
||||||
|
|
||||||
|
datasource:
|
||||||
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://${bunny.datasource.host}:${bunny.datasource.port}/${bunny.datasource.sqlData}?serverTimezone=GMT%2B8&useSSL=false&characterEncoding=utf-8&allowPublicKeyRetrieval=true
|
||||||
|
username: ${bunny.datasource.username}
|
||||||
|
password: "${bunny.datasource.password}"
|
||||||
|
|
||||||
|
cloud:
|
||||||
|
sentinel:
|
||||||
|
log:
|
||||||
|
dir: logs/${spring.application.name}/sentinel
|
||||||
|
nacos:
|
||||||
|
discovery:
|
||||||
|
namespace: ${bunny.nacos.discovery.namespace}
|
||||||
|
server-addr: ${bunny.nacos.server-addr}
|
||||||
|
|
||||||
|
jackson:
|
||||||
|
date-format: yyyy-MM-dd HH:mm:ss
|
||||||
|
time-zone: GMT+8
|
||||||
|
|
||||||
|
|
||||||
|
mybatis-plus:
|
||||||
|
type-aliases-package: com.atguigu.model # 配置每个包前缀
|
||||||
|
mapper-locations: classpath:mapper/*.xml
|
||||||
|
configuration:
|
||||||
|
map-underscore-to-camel-case: true
|
||||||
|
auto-mapping-behavior: full
|
||||||
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 查看日志
|
||||||
|
global-config:
|
||||||
|
db-config:
|
||||||
|
# 设置表名前缀,不用在每个tableName添加前缀
|
||||||
|
# table-prefix: t_
|
||||||
|
# 全局配置主键值方式
|
||||||
|
id-type: assign_id
|
||||||
|
logic-not-delete-value: 0 # 未删除默认为0
|
||||||
|
logic-delete-value: 1 # 删除
|
||||||
|
logic-delete-field: deleted # 全局配置逻辑删除
|
||||||
|
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
com.atguigu.ssyx.acl.mapper: debug
|
||||||
|
com.atguigu.ssyx.acl.controller: info
|
||||||
|
com.atguigu.ssyx.acl.service: info
|
||||||
|
pattern:
|
||||||
|
dateformat: HH:mm:ss:SSS
|
||||||
|
file:
|
||||||
|
path: "logs/${spring.application.name}"
|
||||||
|
|
||||||
|
bunny:
|
||||||
|
minio:
|
||||||
|
endpointUrl: ${bunny.minio.endpointUrl}
|
||||||
|
accessKey: ${bunny.minio.accessKey}
|
||||||
|
secretKey: ${bunny.minio.secretKey}
|
||||||
|
bucket-name: ${bunny.minio.bucket-name}
|
|
@ -0,0 +1,16 @@
|
||||||
|
-----------------▄██-█▄---------
|
||||||
|
-----------------███▄██▄--------
|
||||||
|
-----------------███████--------
|
||||||
|
-----------------▀███████-------
|
||||||
|
-------------------██████▄▄-----
|
||||||
|
-------------------█████████▄---
|
||||||
|
-------------------██████▄████--
|
||||||
|
-------▄███████████████████████-
|
||||||
|
-----▄███████████████████████▀--
|
||||||
|
---▄██████████████████████------
|
||||||
|
---███████████████████████------
|
||||||
|
---███████████████████████------
|
||||||
|
-▄▄██████████████████████▀------
|
||||||
|
-█████████████████▀█████--------
|
||||||
|
-▀██████████████▀▀-▀█████▄------
|
||||||
|
-------▀▀▀▀▀▀▀▀▀------▀▀▀▀------
|
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
Loading…
Reference in New Issue