Reformat a code. | lots and lots of changes (C) whatthecommit.com
This commit is contained in:
68
build.gradle
68
build.gradle
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot' version '2.2.0.M4'
|
||||
id 'groovy'
|
||||
id 'idea'
|
||||
id 'org.springframework.boot' version '2.2.0.M4'
|
||||
id 'groovy'
|
||||
id 'idea'
|
||||
}
|
||||
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
@@ -11,50 +11,50 @@ version = '0.0.1-SNAPSHOT'
|
||||
sourceCompatibility = '1.8'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'https://repo.spring.io/milestone' }
|
||||
mavenCentral()
|
||||
maven { url 'https://repo.spring.io/milestone' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-actuator'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-webflux'
|
||||
implementation 'org.codehaus.groovy:groovy'
|
||||
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
||||
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
||||
exclude group: 'junit', module: 'junit'
|
||||
}
|
||||
testImplementation 'io.projectreactor:reactor-test'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-actuator'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-webflux'
|
||||
implementation 'org.codehaus.groovy:groovy'
|
||||
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
||||
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
||||
exclude group: 'junit', module: 'junit'
|
||||
}
|
||||
testImplementation 'io.projectreactor:reactor-test'
|
||||
|
||||
testImplementation(platform('org.spockframework:spock-bom:1.3-groovy-2.5'))
|
||||
testImplementation 'org.spockframework:spock-core'
|
||||
testImplementation 'org.spockframework:spock-spring'
|
||||
testImplementation(platform('org.spockframework:spock-bom:1.3-groovy-2.5'))
|
||||
testImplementation 'org.spockframework:spock-core'
|
||||
testImplementation 'org.spockframework:spock-spring'
|
||||
}
|
||||
|
||||
test {
|
||||
// useJUnitPlatform() // comment this out to run spock specs!
|
||||
// see: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.logging.TestLoggingContainer.html
|
||||
testLogging {
|
||||
showExceptions = true
|
||||
showStandardStreams = true
|
||||
// set options for log level LIFECYCLE
|
||||
events 'passed', 'skipped', 'failed'
|
||||
// set options for log level DEBUG
|
||||
debug {
|
||||
events 'started', 'skipped', 'failed'
|
||||
exceptionFormat 'full'
|
||||
}
|
||||
// // remove standard output/error logging from --info builds
|
||||
// // by assigning only 'failed' and 'skipped' events
|
||||
// info.events = ['failed', 'skipped']
|
||||
}
|
||||
// useJUnitPlatform() // comment this out to run spock specs!
|
||||
// see: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.logging.TestLoggingContainer.html
|
||||
testLogging {
|
||||
showExceptions = true
|
||||
showStandardStreams = true
|
||||
// set options for log level LIFECYCLE
|
||||
events 'passed', 'skipped', 'failed'
|
||||
// set options for log level DEBUG
|
||||
debug {
|
||||
events 'started', 'skipped', 'failed'
|
||||
exceptionFormat 'full'
|
||||
}
|
||||
// // remove standard output/error logging from --info builds
|
||||
// // by assigning only 'failed' and 'skipped' events
|
||||
// info.events = ['failed', 'skipped']
|
||||
}
|
||||
}
|
||||
|
||||
bootJar {
|
||||
launchScript()
|
||||
launchScript()
|
||||
}
|
||||
|
||||
wrapper {
|
||||
gradleVersion = '5.5.1'
|
||||
gradleVersion = '5.5.1'
|
||||
}
|
||||
|
||||
defaultTasks 'clean', 'build'
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
maven { url 'https://repo.spring.io/milestone' }
|
||||
gradlePluginPortal()
|
||||
}
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.id == 'org.springframework.boot') {
|
||||
useModule("org.springframework.boot:spring-boot-gradle-plugin:${requested.version}")
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven { url 'https://repo.spring.io/milestone' }
|
||||
gradlePluginPortal()
|
||||
}
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.id == 'org.springframework.boot') {
|
||||
useModule("org.springframework.boot:spring-boot-gradle-plugin:${requested.version}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = 'cqrs-eventsourcing-user-management-example'
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||
@SpringBootApplication
|
||||
class UserServiceApplication {
|
||||
|
||||
static void main(String[] args) {
|
||||
SpringApplication.run(UserServiceApplication, args)
|
||||
}
|
||||
static void main(String[] args) {
|
||||
SpringApplication.run(UserServiceApplication, args)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,10 +13,10 @@ class Handlers {
|
||||
|
||||
def showInfo(ServerRequest serverRequest) {
|
||||
String baseUrl = serverRequest.uri().with { "$scheme://$authority" }
|
||||
def API = [ info: "GET $baseUrl/api/v1/messages/info" as String,
|
||||
add : "POST $baseUrl/api/v1/messages message={message}" as String,
|
||||
read: "GET $baseUrl/api/v1/messages/{id}" as String,
|
||||
all : "GET $baseUrl/api/v1/messages" as String, ]
|
||||
def API = [info: "GET $baseUrl/api/v1/messages/info" as String,
|
||||
add : "POST $baseUrl/api/v1/messages message={message}" as String,
|
||||
read: "GET $baseUrl/api/v1/messages/{id}" as String,
|
||||
all : "GET $baseUrl/api/v1/messages" as String,]
|
||||
ServerResponse.ok().body(Mono.just(API), Map)
|
||||
}
|
||||
|
||||
@@ -27,8 +27,10 @@ class Handlers {
|
||||
.bodyToMono(new ParameterizedTypeReference<Map<String, String>>() {})
|
||||
.map { it["message"] ?: "Hello!" }
|
||||
.doOnNext { messages[id] = it }
|
||||
.map { [ id : id,
|
||||
message: messages[id], ] }
|
||||
.map {
|
||||
[id : id,
|
||||
message: messages[id],]
|
||||
}
|
||||
ServerResponse.created(URI.create(url)).body(response, Map)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
#spring.main.lazy-initialization=true
|
||||
spring.main.lazy-initialization=false
|
||||
spring.output.ansi.enabled=always
|
||||
|
||||
Reference in New Issue
Block a user