-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
279 changed files
with
3,151 additions
and
2,140 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>api</artifactId> | ||
<groupId>com.godfunc</groupId> | ||
<version>1.0.0</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>notify</artifactId> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.godfunc</groupId> | ||
<artifactId>common</artifactId> | ||
<version>${project.parent.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-amqp</artifactId> | ||
</dependency> | ||
<!-- spring cloud alibaba --> | ||
<dependency> | ||
<groupId>com.alibaba.cloud</groupId> | ||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.alibaba.cloud</groupId> | ||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> | ||
</dependency> | ||
<!-- 支持返回xml --> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.dataformat</groupId> | ||
<artifactId>jackson-dataformat-xml</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-devtools</artifactId> | ||
<scope>runtime</scope> | ||
<optional>true</optional> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
19 changes: 19 additions & 0 deletions
19
api/notify/src/main/java/com/godfunc/NotifyApplication.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.godfunc; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; | ||
import org.springframework.transaction.annotation.EnableTransactionManagement; | ||
/** | ||
* @author Godfunc | ||
* @email [email protected] | ||
*/ | ||
@SpringBootApplication | ||
@EnableTransactionManagement | ||
@EnableDiscoveryClient | ||
public class NotifyApplication { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(NotifyApplication.class, args); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
48 changes: 48 additions & 0 deletions
48
api/notify/src/main/java/com/godfunc/config/SwaggerConfig.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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.godfunc.config; | ||
|
||
import io.swagger.annotations.ApiOperation; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import springfox.documentation.builders.ApiInfoBuilder; | ||
import springfox.documentation.builders.PathSelectors; | ||
import springfox.documentation.builders.RequestHandlerSelectors; | ||
import springfox.documentation.oas.annotations.EnableOpenApi; | ||
import springfox.documentation.service.*; | ||
import springfox.documentation.spi.DocumentationType; | ||
import springfox.documentation.spring.web.plugins.Docket; | ||
|
||
|
||
|
||
/** | ||
* Swagger配置 | ||
* | ||
* @author godfunc | ||
* @email [email protected] | ||
*/ | ||
@Configuration | ||
@EnableOpenApi | ||
public class SwaggerConfig { | ||
|
||
@Bean | ||
public Docket createRestApi() { | ||
return new Docket(DocumentationType.OAS_30) | ||
.apiInfo(apiInfo()) | ||
.select() | ||
//加了ApiOperation注解的类,生成接口文档 | ||
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) | ||
//包下的类,生成接口文档 | ||
//.apis(RequestHandlerSelectors.basePackage("com.godfunc.controller")) | ||
.paths(PathSelectors.any()) | ||
.build(); | ||
} | ||
|
||
private ApiInfo apiInfo() { | ||
return new ApiInfoBuilder() | ||
.title("Godfunc-Notify") | ||
.description("Godfunc-Notify文档") | ||
.termsOfServiceUrl("https://godfunc.fun") | ||
.version("1.0.0") | ||
.build(); | ||
} | ||
|
||
} |
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
10 changes: 10 additions & 0 deletions
10
api/notify/src/main/java/com/godfunc/constant/ApiConstant.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.godfunc.constant; | ||
|
||
/** | ||
* @author godfunc | ||
* @email [email protected] | ||
*/ | ||
public interface ApiConstant { | ||
|
||
String NOTIFY_SERVICE_PREFIX = "notify_service_"; | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.