dstarcev
02/06/2018, 11:11 AMCzar
02/08/2018, 7:00 PMfabricio
02/09/2018, 10:31 AMinterface ContactRepository : MongoRepository<Contact, String> {
fun abc() {
}
}
This code doesn't work, it throws:
Caused by: org.springframework.data.mapping.PropertyReferenceException: No property abc found for type Contact!but default method in repository does work in java
dh44t
02/09/2018, 10:40 AMdh44t
02/09/2018, 10:41 AMdh44t
02/09/2018, 10:42 AMfun ContactRepository.abc() {}
sdeleuze
02/09/2018, 10:42 AMdh44t
02/09/2018, 10:42 AMsdeleuze
02/09/2018, 10:42 AMsdeleuze
02/09/2018, 10:43 AMdh44t
02/09/2018, 10:44 AMfabricio
02/09/2018, 10:48 AMclass A(b: B)
is saved in the db:
{
_id: ....,
_class: "B"
}
but it should be:
{
_id: .....,
_class: "A",
b: { .... }
}
dh44t
02/09/2018, 10:50 AMdh44t
02/09/2018, 10:50 AMfabricio
02/09/2018, 10:50 AMdh44t
02/09/2018, 10:51 AMclass A
in Javadh44t
02/09/2018, 10:52 AMdh44t
02/09/2018, 10:53 AMfabricio
02/09/2018, 10:53 AMdh44t
02/09/2018, 10:55 AMclass A(val b:B)
fabricio
02/09/2018, 10:56 AMdh44t
02/09/2018, 10:56 AMdh44t
02/09/2018, 10:56 AMfabricio
02/09/2018, 10:56 AMdh44t
02/09/2018, 10:57 AMfabricio
02/09/2018, 10:57 AMaleksandrsl
02/09/2018, 1:04 PMBeanFactory has not been injected into @Configuration class
when all beans are declared this way:
@get: Bean
val securityEvaluationContextExtensionProvider = SecurityEvaluationContextExtension()
but when at least one bean is declared the normal way
@Bean
fun authenticationProvider(): DaoAuthenticationProvider = DaoAuthenticationProvider().apply {
setUserDetailsService(userDetailsServiceProvider)
}
all works perfect. Is it a bug or I have to inject BeanFactory
manually?
I'm using Spring-Boot 2.0.0.RC1sdeleuze
02/09/2018, 4:10 PMopen
?sdeleuze
02/09/2018, 4:11 PMsdeleuze
02/09/2018, 4:11 PM