Issue
I encountered an error with one of my repository classes where I'm using JdbcOperations. This issue happened when I updated Micronaut from version 3.5.0
to 3.6.0
.
Caused by: java.lang.IncompatibleClassChangeError: class com.myapp.repository.BulkUserMailSettingRepository$Intercepted cannot inherit from final class com.myapp.repository.BulkUserMailSettingRepository
@Repository
class BulkUserMailSettingRepository(private val jdbcOperations: JdbcOperations)
I can compile it by adding the @Singleton
annotation, but I don't understand why.
Solution
Micronaut creates a subclass of your class and adds bean/query functionality there. You just need to make your class subclass-able by adding open
:
@Repository
open class BulkUserMailSettingRepository(private val jdbcOperations: JdbcOperations)
Answered By - Burt Beckwith
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.