https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
spring
  • e

    enleur

    10/04/2017, 8:41 PM
    what about vertx drivers?
    s
    • 2
    • 1
  • v

    villela

    10/06/2017, 7:28 PM
    Hello, I'm having a issue with transient fields: as I've seen in Java JPA @Document @Transient fields moved to use the transient java keyword, in Kotlin there's only the annotation. Is it supposed to work in Kotlin with @Transient or there is another trick to do that?
    a
    t
    • 3
    • 11
  • t

    tiare.balbi

    10/16/2017, 1:07 PM
    I created a different branch "exception"
    m
    • 2
    • 10
  • f

    Felipe

    10/19/2017, 8:17 AM
    I could set the default property value to an empty String as the example under, but still not quite optimal.
    @Value("\${email.address.override:}")
    m
    • 2
    • 9
  • j

    jasper

    10/24/2017, 12:28 PM
    ^-- had to both unroll the method, and add JVMStatic
    n
    l
    • 3
    • 6
  • l

    lex

    10/25/2017, 4:09 AM
    @sdeleuze link from header is 404 https://docs.spring.io/spring/docs/current/spring-framework-reference/kotlin.html
    a
    s
    n
    • 4
    • 4
  • m

    michael salmon

    11/01/2017, 1:59 PM
    @Czar nice idea thanks, i haven’t explored spring profiles but seems reasonable, at least assuming it’s not a pita to setup for this 🙂
    c
    • 2
    • 2
  • m

    michael salmon

    11/03/2017, 7:49 PM
    has anyone made integration tests for endpoints protected by jwt by chance? i am unable to get them to fail amazingly lol
    n
    a
    • 3
    • 7
  • s

    Sola

    11/06/2017, 4:41 AM
    also https://stackoverflow.com/questions/32970923/resolving-accidental-override-errors-in-kotlin
    c
    • 2
    • 2
  • t

    tiare.balbi

    11/08/2017, 3:08 PM
    the videos are available already?
    l
    • 2
    • 1
  • s

    sdeleuze

    11/10/2017, 9:20 AM
    https://twitter.com/sdeleuze/status/928597047716073472
    👍 10
    ❤️ 14
    a
    • 2
    • 1
  • m

    Mavelys

    11/13/2017, 12:45 PM
    anyone have a good kotlin spring boot angular seed project? im getting started playing with things and thats the direction im going in
    c
    n
    s
    • 4
    • 6
  • c

    Czar

    11/14/2017, 11:00 AM
    I remember from some time ago
    @Value("\${provider.url:}") lateinit var urlString: String
    worked.
    q
    • 2
    • 5
  • o

    oskarh

    11/14/2017, 11:03 AM
    I’m trying to add a nullable
    @RequestParam
    of type
    Int
    , but get
    "Optional int parameter 'p' is present but cannot be translated into a null value due to being declared as a primitive type. Consider declaring it as object wrapper for the corresponding primitive type."
    Any way I can force Kotlin to use the wrapper class Integer instead of the primitive type?
    c
    • 2
    • 6
  • n

    nikos

    11/19/2017, 7:05 PM
    @gert.claeskens please be aware that your application entry point is the start point for the component scan (implictly implied by
    @SpringBootApplication
    ), so that you either have to add the package of your
    FooRepository
    to the component scan packages, or put FooRepository in the same package or sub-package where
    ReactiveKotlinApplication
    lives, see https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-structuring-your-code.html for details
    👍 2
    g
    • 2
    • 1
  • s

    sdeleuze

    11/20/2017, 8:00 AM
    @gert.claeskens If you are going with the bean definition way, you can also probably declare your bean explicitly with
    bean<FooRepository>()
    and
    bean<BarRepository>()
    in the
    beans {}
    block.
    g
    • 2
    • 5
  • e

    ecampolo

    11/21/2017, 12:13 PM
    I know this is not 100% spring related, but it is quite likely you bumped into this. I'm trying to annotate a delegated property with some jpa annotation and i get an error saying that a member property with delegate is not applicable:
    @Column(name = "title", nullable = false)
    var title by Verified(title, "The title cannot be blank", String::isNotBlank) // Verified is a Delegate.
    c
    • 2
    • 2
  • q

    qwert_ukg

    11/23/2017, 4:06 AM
    reason was found - if Entity implements interface -
    spring.jackson.property-naming-strategy=SNAKE_CASE
    is not working 😞
    x
    • 2
    • 2
  • c

    Czar

    11/27/2017, 1:58 PM
    AHA, so it is indeed spring's fault. I had this problems and ended up forcing 1.1.61 to all libs even the ones that should've been transitives. Thanks.
    l
    • 2
    • 1
  • s

    sdeleuze

    11/27/2017, 1:59 PM
    That's a feature that will avoid mixing various Kotlin versions 😉 It will be properly documented.
    c
    • 2
    • 1
  • l

    leodeng

    11/27/2017, 2:04 PM
    @sdeleuze which feature,
    gradle.properties
    or
    ext['kotlin.version]
    ? i’d prefer the latter, since it centralized the kotlinVersion definition
    c
    • 2
    • 13
  • s

    sdeleuze

    11/28/2017, 2:08 PM
    https://twitter.com/sdeleuze/status/935505440540188673
    🍺 2
    🎉 1
    l
    • 2
    • 4
  • s

    sdeleuze

    11/29/2017, 10:22 AM
    Also be aware that unlike M6, M7 does not include
    compile("com.fasterxml.jackson.module:jackson-module-kotlin")
    so you have to add it back to your project dependencies. We will try to tackle that on start.spring.io side.
    c
    l
    • 3
    • 8
  • a

    ander.dev

    11/30/2017, 9:49 PM
    @leodeng yeah man, I dont really understand too, do you mind to have a look at my code? https://ander_dev@bitbucket.org/ander_dev/kotlin-jee.git
    c
    l
    • 3
    • 40
  • s

    sdeleuze

    12/03/2017, 3:10 PM
    @Sola Could you give me more détails about those issues ?
    s
    t
    • 3
    • 3
  • f

    fitzoh

    12/04/2017, 3:55 PM
    So anyone else hanging out at https://springoneplatform.io/ ?
    s
    t
    s
    • 4
    • 3
  • e

    enleur

    12/05/2017, 10:02 AM
    can I use spring webflux with spring boot 1.x?
    c
    • 2
    • 1
  • l

    leodeng

    12/06/2017, 11:54 AM
    @sdeleuze i know you’re probably busy now, but when you have time, can you look at this dependency-management plugin behavior: i accidentally set the
    kotlin.version
    to null (
    ext['kotlin.version'] = null
    ), but the error reported is interesting:
    * What went wrong:
    Execution failed for task ':compileKotlin'.
    > Could not resolve all files for configuration ':compileClasspath'.
       > Could not find org.springframework.boot:spring-boot-starter-webflux:.
         Required by:
             project :
       > Could not find org.springframework.boot:spring-boot-starter-data-jpa:.
         Required by:
             project :
       > Could not find org.springframework.integration:spring-integration-webflux:.
         Required by:
             project :
       > Could not find com.fasterxml.jackson.module:jackson-module-kotlin:.
         Required by:
             project :
    there are no errors mentioning kotlin, and why would other dependencies resolution fail?
    • 1
    • 1
  • t

    tiare.balbi

    12/09/2017, 2:36 PM
    @sdeleuze Do you know if Spring Boot 2.0.0 GA plans is to release with Kotlin 1.2.x or 1.1.6x?
    c
    • 2
    • 8
  • j

    juliocbcotta

    12/09/2017, 2:58 PM
    Hey guys/girls... I am starting with spring boot and kotlin... and I found some problems with hashcode when my entity class is a
    data class
    ... is there any solution that does not involves implementing equals and hashcode by hand?
    c
    l
    • 3
    • 8
Powered by Linen
Title
j

juliocbcotta

12/09/2017, 2:58 PM
Hey guys/girls... I am starting with spring boot and kotlin... and I found some problems with hashcode when my entity class is a
data class
... is there any solution that does not involves implementing equals and hashcode by hand?
c

Czar

12/09/2017, 3:09 PM
Hi, some problems - yes, some - no 🙂 Any specific problems?
j

juliocbcotta

12/09/2017, 5:53 PM
As far as I could understand. When trying to access a list of entities ( data classes) through a relationship spring uses hashcode to do something and fails. I will post the stacktrace.
https://pastebin.com/FhpBqYdZ
the juice parte in the stack above is between lines 32 and 37 ... It happens when I access http://localhost:8080/users/1/trainings ... meaning a User from a Team has Trainings in Sectors
If I remove the
data
from Training class the request works fine.
l

lex

12/11/2017, 3:56 AM
there is not full stack trace.
I think this is typical problem with back references, hashCode method call hashCode on fields and back reference call it again recursively
try to write it yourself without data class
View count: 3