-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add seata canal email send msg demo update fastJson version
- Loading branch information
Showing
62 changed files
with
2,325 additions
and
2,395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 19 additions & 19 deletions
38
.../top/kuanghua/tyuser/UserApplication.java → ...ionfront/IntegrationFrontApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
package top.kuanghua.tyuser; | ||
|
||
import io.seata.spring.annotation.datasource.EnableAutoDataSourceProxy; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
/** | ||
* @Title: UserApplication | ||
* @Description: | ||
* @Auther: kuanghua | ||
* @create 2020/11/7 20:07 | ||
*/ | ||
@SpringBootApplication | ||
@EnableAutoDataSourceProxy | ||
public class UserApplication { | ||
public static void main(String[] args) { | ||
SpringApplication.run(UserApplication.class, args); | ||
} | ||
} | ||
package top.kuanghua.integrationfront; | ||
|
||
import io.seata.spring.annotation.datasource.EnableAutoDataSourceProxy; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
/** | ||
* @Title: UserApplication | ||
* @Description: | ||
* @Auther: kuanghua | ||
* @create 2020/11/7 20:07 | ||
*/ | ||
@SpringBootApplication | ||
@EnableAutoDataSourceProxy | ||
public class IntegrationFrontApplication { | ||
public static void main(String[] args) { | ||
SpringApplication.run(IntegrationFrontApplication.class, args); | ||
} | ||
} |
54 changes: 27 additions & 27 deletions
54
...op/kuanghua/tyuser/config/BaseConfig.java → ...a/integrationfront/config/BaseConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
package top.kuanghua.tyuser.config; | ||
|
||
import org.mybatis.spring.annotation.MapperScan; | ||
import org.springframework.cloud.openfeign.EnableFeignClients; | ||
import org.springframework.context.annotation.ComponentScan; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
/** | ||
* @Title: BaseConfig | ||
* @Description: | ||
* @Auther: kuanghua | ||
* @create 2020/8/23 21:52 | ||
*/ | ||
/* | ||
* 总结:1.@Configuration 下的@ComponentScan回将包下带有@Component扫描变成配置类, | ||
* 而@SpringBootApplication扫描的只会变成普通类 | ||
* */ | ||
@Configuration | ||
//扫描公用包的配置和自身的配置类 | ||
@ComponentScan(basePackages = {"top.kuanghua.khcomomon","top.kuanghua.tyuser"}) | ||
//feign扫描 | ||
@EnableFeignClients(basePackages = {"top.kuanghua.feign.tyexecl","top.kuanghua.feign.tyauth"}) | ||
//mapper包扫描 | ||
@MapperScan(basePackages = {"top.kuanghua.tyuser.mapper"}) | ||
public class BaseConfig { | ||
|
||
} | ||
package top.kuanghua.integrationfront.config; | ||
|
||
import org.mybatis.spring.annotation.MapperScan; | ||
import org.springframework.cloud.openfeign.EnableFeignClients; | ||
import org.springframework.context.annotation.ComponentScan; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
/** | ||
* @Title: BaseConfig | ||
* @Description: | ||
* @Auther: kuanghua | ||
* @create 2020/8/23 21:52 | ||
*/ | ||
/* | ||
* 总结:1.@Configuration 下的@ComponentScan回将包下带有@Component扫描变成配置类, | ||
* 而@SpringBootApplication扫描的只会变成普通类 | ||
* */ | ||
@Configuration | ||
//扫描公用包的配置和自身的配置类 | ||
@ComponentScan(basePackages = {"top.kuanghua.khcomomon", "top.kuanghua.integrationfront"}) | ||
//feign扫描 | ||
@EnableFeignClients(basePackages = {"top.kuanghua.feign.tyauth"}) | ||
//mapper包扫描 | ||
@MapperScan(basePackages = {"top.kuanghua.integrationfront.mapper"}) | ||
public class BaseConfig { | ||
|
||
} |
112 changes: 56 additions & 56 deletions
112
...uanghua/tyuser/config/Swagger2Config.java → ...tegrationfront/config/Swagger2Config.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,56 @@ | ||
package top.kuanghua.tyuser.config; | ||
|
||
import io.swagger.annotations.ApiOperation; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.stereotype.Component; | ||
import springfox.documentation.builders.ApiInfoBuilder; | ||
import springfox.documentation.builders.PathSelectors; | ||
import springfox.documentation.builders.RequestHandlerSelectors; | ||
import springfox.documentation.service.ApiInfo; | ||
import springfox.documentation.service.Contact; | ||
import springfox.documentation.spi.DocumentationType; | ||
import springfox.documentation.spring.web.plugins.Docket; | ||
import springfox.documentation.swagger2.annotations.EnableSwagger2; | ||
|
||
@Component | ||
@EnableSwagger2 //开启在线接口文档 | ||
//配置包扫描 | ||
public class Swagger2Config { | ||
private boolean swagger_is_enable = true; | ||
// @Value("${.ipAddr}") | ||
// private String ipAddr; | ||
@Value("${server.port}") | ||
private String port; | ||
|
||
@Bean | ||
public Docket api() { | ||
return new Docket(DocumentationType.SWAGGER_2) | ||
.enable(swagger_is_enable) | ||
//.host(this.ipAddr + ":" + this.port) | ||
.apiInfo(apiInfo()) | ||
.select() | ||
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) | ||
//.apis(basePackage("top.kuanghua.swagger.controller")) | ||
.paths(PathSelectors.any()) | ||
.build(); | ||
} | ||
|
||
/** | ||
* 构建 api文档的详细信息函数 | ||
* | ||
* @return | ||
*/ | ||
private ApiInfo apiInfo() { | ||
return new ApiInfoBuilder() | ||
.title("标题:swagger文档") | ||
.description("描述:新一代的微服务架构") | ||
.contact(new Contact("jzfai", null, "[email protected]")) | ||
.version("版本号:2.8") | ||
.build(); | ||
} | ||
|
||
/** | ||
* http://localhost:8080/swagger-ui.html | ||
*/ | ||
} | ||
package top.kuanghua.integrationfront.config; | ||
|
||
import io.swagger.annotations.ApiOperation; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.stereotype.Component; | ||
import springfox.documentation.builders.ApiInfoBuilder; | ||
import springfox.documentation.builders.PathSelectors; | ||
import springfox.documentation.builders.RequestHandlerSelectors; | ||
import springfox.documentation.service.ApiInfo; | ||
import springfox.documentation.service.Contact; | ||
import springfox.documentation.spi.DocumentationType; | ||
import springfox.documentation.spring.web.plugins.Docket; | ||
import springfox.documentation.swagger2.annotations.EnableSwagger2; | ||
|
||
@Component | ||
@EnableSwagger2 //开启在线接口文档 | ||
//配置包扫描 | ||
public class Swagger2Config { | ||
private boolean swagger_is_enable = true; | ||
// @Value("${.ipAddr}") | ||
// private String ipAddr; | ||
@Value("${server.port}") | ||
private String port; | ||
|
||
@Bean | ||
public Docket api() { | ||
return new Docket(DocumentationType.SWAGGER_2) | ||
.enable(swagger_is_enable) | ||
//.host(this.ipAddr + ":" + this.port) | ||
.apiInfo(apiInfo()) | ||
.select() | ||
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) | ||
//.apis(basePackage("top.kuanghua.swagger.controller")) | ||
.paths(PathSelectors.any()) | ||
.build(); | ||
} | ||
|
||
/** | ||
* 构建 api文档的详细信息函数 | ||
* | ||
* @return | ||
*/ | ||
private ApiInfo apiInfo() { | ||
return new ApiInfoBuilder() | ||
.title("标题:swagger文档") | ||
.description("描述:新一代的微服务架构") | ||
.contact(new Contact("jzfai", null, "[email protected]")) | ||
.version("版本号:2.8") | ||
.build(); | ||
} | ||
|
||
/** | ||
* http://localhost:8080/swagger-ui.html | ||
*/ | ||
} |
Oops, something went wrong.