Global update

This commit is contained in:
Sebastien Deleuze
2017-06-07 10:44:15 +02:00
parent 5a6dd0deb3
commit b43e9fdde6
7 changed files with 26 additions and 25 deletions

View File

@@ -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"

Binary file not shown.

View File

@@ -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

20
gradlew vendored
View File

@@ -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" "$@"

View File

@@ -1 +0,0 @@
rootProject.buildFileName = 'build.gradle.kts'

View File

@@ -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()

View File

@@ -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: