forked from microservices-patterns/ftgo-application
-
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.
Merge pull request microservices-patterns#108 from dartartem/development
Upgraded eventuate dependencies
- Loading branch information
Showing
28 changed files
with
91 additions
and
90 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,3 @@ | ||
dependencies { | ||
compile ("io.springfox:springfox-swagger2:2.8.0") { | ||
exclude group: "org.springframework" | ||
} | ||
compile ("io.springfox:springfox-swagger-ui:2.8.0"){ | ||
exclude group: "org.springframework" | ||
} | ||
compile "org.springframework.boot:spring-boot-starter-web:$springBootVersion" | ||
compile project(":ftgo-common") | ||
compile "io.eventuate.util:eventuate-util-spring-swagger:$eventuateUtilVersion" | ||
} |
37 changes: 3 additions & 34 deletions
37
...dson/eventstore/examples/customersandorders/commonswagger/CommonSwaggerConfiguration.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,45 +1,14 @@ | ||
package net.chrisrichardson.eventstore.examples.customersandorders.commonswagger; | ||
|
||
import com.fasterxml.classmate.TypeResolver; | ||
import net.chrisrichardson.ftgo.common.Money; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import io.eventuate.util.spring.swagger.EventuateSwaggerConfig; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.context.request.async.DeferredResult; | ||
import springfox.documentation.builders.RequestHandlerSelectors; | ||
import springfox.documentation.schema.WildcardType; | ||
import springfox.documentation.spi.DocumentationType; | ||
import springfox.documentation.spring.web.plugins.Docket; | ||
import springfox.documentation.swagger2.annotations.EnableSwagger2; | ||
|
||
import java.util.concurrent.CompletableFuture; | ||
|
||
import static springfox.documentation.schema.AlternateTypeRules.newRule; | ||
|
||
@Configuration | ||
@EnableSwagger2 | ||
public class CommonSwaggerConfiguration { | ||
|
||
@Bean | ||
public Docket api() { | ||
return new Docket(DocumentationType.SWAGGER_2) | ||
.select() | ||
.apis(RequestHandlerSelectors.basePackage("net.chrisrichardson.ftgo")) | ||
.build() | ||
.pathMapping("/") | ||
.genericModelSubstitutes(ResponseEntity.class, CompletableFuture.class) | ||
.alternateTypeRules( | ||
newRule(typeResolver.resolve(DeferredResult.class, | ||
typeResolver.resolve(ResponseEntity.class, WildcardType.class)), | ||
typeResolver.resolve(WildcardType.class)), | ||
newRule(Money.class, String.class) | ||
) | ||
.useDefaultResponseMessages(false) | ||
; | ||
public EventuateSwaggerConfig eventuateSwaggerConfig() { | ||
return () -> "net.chrisrichardson.ftgo"; | ||
} | ||
|
||
@Autowired | ||
private TypeResolver typeResolver; | ||
|
||
} |
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
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
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
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
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
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
Oops, something went wrong.