Tim Schraepen
06/24/2019, 7:56 AMJukka Siivonen
06/24/2019, 9:52 AMahulyk
06/26/2019, 9:36 AMdata class
as Entity
?wakingrufus
06/26/2019, 9:49 PMJonatas
06/28/2019, 2:33 PMM1heng
07/02/2019, 9:11 AMsdeleuze
07/08/2019, 2:03 PMGerard Klijs
07/14/2019, 8:50 AMgmariotti
07/18/2019, 5:58 AMbootJar
task has a dependency on kaptKotlin
? My understanding is that kapt is needed only for the metadata generation for the ide, am I wrong?Soren Valle
07/18/2019, 9:32 PM.registerModule(KotlinModule())
some how to get spring rest controller end points to deserialize the request body?xenoterracide
07/25/2019, 6:04 PMParameter 2 of constructor in com.potreromed.gateway.usecase.InitialFoleySetupApplicationService required a bean of type 'com.potreromed.gateway.model.PatientService' that could not be found.
Action:
Consider defining a bean of type 'com.potreromed.gateway.model.PatientService' in your configuration.
`
Czar
07/29/2019, 12:38 PMplugins {
id("org.springframework.boot") version "2.1.6.RELEASE"
id("io.spring.dependency-management") version "1.0.7.RELEASE"
val kotlinVersion = "1.3.41"
kotlin("jvm") version kotlinVersion
kotlin("plugin.spring") version kotlinVersion
kotlin("kapt") version kotlinVersion
}
dependencies {
kapt("org.springframework.boot:spring-boot-configuration-processor")
implementation(kotlin("reflect"))
implementation(kotlin("stdlib-jdk8"))
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
//...
}
application.yml
security:
csrfEnabled: true
token.writer.secret: h2l89efhlwskiehf89o23fhnsldhf89023
usage of secret
in a class:
@ConfigurationProperties(prefix = "security.token.writer")
class TokenBasedAuthenticationFilter {
private lateinit var secret: String
//...
There is no metadata or autocomplete and IntelliJ shows Cannot resolve configuration property 'security.token.writer.secret'
warning
Am I missing something or is it a bug/limitation?Fabian
07/30/2019, 2:47 PM@Transaction
to _commit_/_rollback_ the current transaction. However, I want my service layer to be something like Either<Error, A>
KyooSik Lee
08/01/2019, 10:50 AMbuild.gradle.kts
file, but suddenly the gradle keeps giving me these import errors.
Details: org.gradle.internal.resolve.ArtifactNotFoundException: Could not find spring-context.jar (org.springframework:spring-context:5.2.0.BUILD-SNAPSHOT:20190801.073001-611).
Searched in the following locations:
<https://repo.spring.io/snapshot/org/springframework/spring-context/5.2.0.BUILD-SNAPSHOT/spring-context-5.2.0.BUILD-20190731.114634-606.jar>
So I looked up the URL, and there is no spring-context-jar file that ends with 20190731
, but only 20190801
.
Am I using outdated dependency?
Following is my dependencies
dependencies {
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.springframework.boot:spring-boot-starter-webflux:5.1.7.RELEASE")
implementation("org.springframework.boot:spring-boot-starter-data-mongodb-reactive")
implementation("org.mongodb:mongodb-driver-reactivestreams")
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")
}
Thanks for helpingLenny
08/05/2019, 5:54 AMRobert Jaros
08/05/2019, 2:46 PMJonas Bark
08/07/2019, 10:56 AMreqeust.awaitPrincipal()
always returns null.
I'm using coRouter and all I do is:
suspend fun categoriesGet(request: ServerRequest): ServerResponse {
val principal = request.awaitPrincipal()
println("PRINCIP: $principal")
}
when I use the standard-non-coroutine router I'm getting the expected result:
fun hello(request: ServerRequest): Mono<ServerResponse> {
return request.principal()
.map { it.name }
.flatMap { userName ->
ok().contentType(MediaType.APPLICATION_JSON)
.syncBody("Hello $userName")
}
}
is this a bug?Robert Jaros
08/07/2019, 1:58 PMsdeleuze
08/09/2019, 2:05 PMpublic interface Expression {
@Nullable
Object getValue(EvaluationContext context, Object rootObject) throws EvaluationException;
@Nullable
<T> T getValue(EvaluationContext context, @Nullable Class<T> desiredResultType) throws EvaluationException;
}
And following Kotlin code val value = expression.getValue(context, String::class.java)
, the method used is the first variant, not the second (with IDEA 2019.2 and Kotlin 1.3.41). Why?corneil
08/12/2019, 2:44 PMsdeleuze
08/12/2019, 2:53 PMRobert Jaros
08/12/2019, 4:09 PM.value("fieldName", v)
for inserting using fluent API for R2DBC with v
as nullable String?
? I have to check for null
and use .nullValue("fieldName")
instead. And it ruins the whole purpose of the fluent API.
https://docs.spring.io/spring-data/r2dbc/docs/1.0.0.M2/reference/html/#r2dbc.datbaseclient.fluent-api.insertRobert Menke
08/25/2019, 6:02 AMDataJpaTest
working I had to add the annotation @ComponentScan("com.my.package")
to the class. Is this normal? If so, is it documented?
@DataJpaTest
@ComponentScan("com.my.package")
class UserTest @Autowired constructor(
private val userService: UserService
): AnnotationSpec() {
@Test fun `Test that findByEmail handles capitalization inconsistencies`() {
val user = User(email = "mYeMail@gmail.COm", password = "password")
val persistedUser = userService.createUser(user)
val email = "MyEmaIL@GMAil.Com"
val found = userService.find(UserEmailIdentity(email))
found.email shouldBe persistedUser.email
}
}
Robert Menke
08/25/2019, 8:03 PMsdeleuze
08/30/2019, 7:11 AMsdeleuze
08/30/2019, 7:22 AMCzar
09/03/2019, 9:42 AMlex
09/04/2019, 5:24 AMsdeleuze
09/05/2019, 3:04 PMxenoterracide
09/09/2019, 4:35 PM@SpringBootTest
javax.persistence.TransactionRequiredException: No EntityManager with actual transaction available for current thread - cannot reliably process 'merge' call
xenoterracide
09/09/2019, 4:35 PM@SpringBootTest
javax.persistence.TransactionRequiredException: No EntityManager with actual transaction available for current thread - cannot reliably process 'merge' call
ienoobong
09/09/2019, 6:07 PM@DataJpaTest
or similarxenoterracide
09/09/2019, 6:09 PMBorgers Toon
09/10/2019, 7:40 AM@Transactional
annotation on the test class/method. You'll get a test transaction you can commit/rollback manually: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/test/context/transaction/TestTransaction.html