diff --git a/build.gradle.kts b/build.gradle.kts index d9e3dd5..463b51e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,25 +1,25 @@ buildscript { - extra["kotlinVersion"] = "1.1-M02" + extra["kotlinVersion"] = "1.1.2-4" repositories { mavenCentral() - maven { setUrl("http://dl.bintray.com/kotlin/kotlin-eap-1.1")} } dependencies { classpath(kotlinModule("gradle-plugin", extra["kotlinVersion"] as String)) - classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.1.RELEASE") + classpath(kotlinModule("allopen", extra["kotlinVersion"] as String)) + classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.3.RELEASE") } } apply { plugin("kotlin") - plugin("spring-boot") + plugin("kotlin-spring") + plugin("org.springframework.boot") } repositories { mavenCentral() - maven { setUrl("http://dl.bintray.com/kotlin/kotlin-eap-1.1")} maven { setUrl("https://dl.bintray.com/kotlin/exposed") } maven { setUrl("https://dl.bintray.com/sdeleuze/maven/") } } @@ -33,7 +33,7 @@ dependencies { compile(kotlinModule("stdlib", extra["kotlinVersion"] as String)) compile(kotlinModule("reflect", extra["kotlinVersion"] as String)) - compile("com.fasterxml.jackson.module:jackson-module-kotlin:2.8.4") + compile("com.fasterxml.jackson.module:jackson-module-kotlin") compile(exposedModule("exposed")) compile(exposedModule("spring-transaction")) @@ -49,4 +49,4 @@ dependencies { testCompile("org.springframework.restdocs:spring-restdocs-mockmvc:1.1.1.RELEASE") } -fun exposedModule(module: String) = "org.jetbrains.exposed:$module:0.5.0" +fun exposedModule(module: String) = "org.jetbrains.exposed:$module:0.8" diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 6ffa237..a3e5ac6 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3ed61d3..145195f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Nov 08 09:38:21 CET 2016 +#Wed Jun 07 10:03:52 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.2-rc-3-bin.zip +distributionUrl=https\://repo.gradle.org/gradle/dist-snapshots/gradle-script-kotlin-4.0-20170518042627+0000-all.zip diff --git a/gradlew b/gradlew index 9aa616c..4ef3a87 100755 --- a/gradlew +++ b/gradlew @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh ############################################################################## ## @@ -154,16 +154,18 @@ if $cygwin ; then esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +# Escape application args +for s in "${@}" ; do + s=\"$s\" + APP_ARGS=$APP_ARGS" "$s +done + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- "$DEFAULT_JVM_OPTS" "$JAVA_OPTS" "$GRADLE_OPTS" "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [[ "$(uname)" == "Darwin" ]] && [[ "$HOME" == "$PWD" ]]; then +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then cd "$(dirname "$0")" fi -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +exec "$JAVACMD" "$@" diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index b3a69a7..0000000 --- a/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.buildFileName = 'build.gradle.kts' \ No newline at end of file diff --git a/src/main/kotlin/io/spring/messenger/Application.kt b/src/main/kotlin/io/spring/messenger/Application.kt index b1fefcb..9baffa0 100644 --- a/src/main/kotlin/io/spring/messenger/Application.kt +++ b/src/main/kotlin/io/spring/messenger/Application.kt @@ -19,23 +19,23 @@ import javax.sql.DataSource @SpringBootApplication @EnableTransactionManagement -open class Application { +class Application { @Bean - open fun objectMapper(): ObjectMapper { + fun objectMapper(): ObjectMapper { val mapper:ObjectMapper = Jackson2ObjectMapperBuilder().modulesToInstall(PostGISModule()).build() mapper.setSerializationInclusion(Include.NON_NULL) return mapper } @Bean - open fun transactionManager(dataSource: DataSource) = SpringTransactionManager(dataSource) + fun transactionManager(dataSource: DataSource) = SpringTransactionManager(dataSource) @Bean // PersistenceExceptionTranslationPostProcessor with proxyTargetClass=false, see https://github.com/spring-projects/spring-boot/issues/1844 - open fun persistenceExceptionTranslationPostProcessor() = PersistenceExceptionTranslationPostProcessor() + fun persistenceExceptionTranslationPostProcessor() = PersistenceExceptionTranslationPostProcessor() @Bean - open fun init(ur: UserRepository, mr: MessageRepository) = CommandLineRunner { + fun init(ur: UserRepository, mr: MessageRepository) = CommandLineRunner { ur.createTable() mr.createTable() mr.deleteAll() diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index a513d62..e696e63 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -5,7 +5,7 @@ spring: datasource: platform: "postgis" driver-class-name: "org.postgis.DriverWrapper" - url: "jdbc:postgresql_postGIS://localhost/seb" + url: "jdbc:postgresql_postGIS://localhost/geospatial-messenger" username: "postgres" mvc: async: