I’ve created a custom annotation in java and I’m trying to use it in a Kotlin written class but in the compile time, I’m getting an error: Annotation parameter must be a compile-time constant Here …
Why is Guava’s EventBus marked unstable in IntelliJ 2018.2?
A new inspection was added in IntelliJ 2018.2 which should warn from unstable APIs: https://youtrack.jetbrains.com/issue/IDEA-159541. This warning shows up for the Guava’s EventBus. Why is this an unstable API? Answer Because the EventBus class is annotated as @Beta. You’d have to ask the Guava project maintainers why a class that exists for 16 versions of Guava is still Beta, but
java 10 gradle project : automatic module not found
I created a java 10 project with intelliJ, using gradle. I copied some stuff into it (some “AppFx” class using the library guava and javaFx, and a personal build.gradle file). I also added a module-info.java file in src/main/java with this content: in which grava is an automatic module. here is the relevant part of build.gradle: intelliJ can compile the project
MappingJackson2HttpMessageConverter configuration is not being recognized in spring boot 2
I am working with spring for a while already and in my spring boot 1.5x’s projects always dealing with the LazyInitializationException with the next configuration (more downstairs) but now I am creating a new project with spring boot 2 and the same configuration is not being recognized further than WebMvcConfigurer now replace to the deprecated WebMvcConfigurerAdapter. My configuration: But after
Aren’t Anonymous Inner Classes actually subclasses?
Assume that A is a custom class, and consider the following declaration of an anonymous inner class: A Obj = new A() { @Override public String toString() { return “Hello!”; } } …
Unknown data type when using an integer over NamedParameterJDBCTemplate on H2 [SPRING-BOOT]
I’m testing a Dao with an In-Memory DB with H2. I’m passing an int to the query with a map to execute it. This query is working OK on Oracle SQL, but is not succeding in H2. DAO QUERIES When I try to execute this query on H2, it returns: Error I tried to execute the query hardcoding the int
What is the purpose of the Hibernate ReturningWork interface?
I am working on one JAVA + Hibernate project but currently, I saw one interface in my code (i.e. ReturningWork<Long>) which has one method called execute(java.sql.Connection). My question is what is the use of this ReturningWork interface? Answer As I explained in more details on my blog, you can use the ReturningWork and the Work interfaces to implement any logic
What does push into stack means? move or duplicate method?
When an object calls a function, the function would be pushed from the method area into the stack. My question is: Q: What does that “push” mean in this context? Does that simply mean move(from the method area) or copy of the function(a copy of the method pushed onto the stack)? Answer The method itself is not pushed onto the
Java 9 migration issue – package com.mymodule is declared in unnamed module , module ‘newmodule’ does not read it
I have created a multimodule project with the following structure Now i want to use Util.java which is a non modularized code in a modularized module newmodule. i have declared following in newmodule Project is compiling fine, but Intellij is showing module not found and package com.mymodule is declared in unnamed module , module ‘newmodule’ does not read it. How
Docker (Spring Boot or Thorntail) and Keycloak
i have a Problem Running Spring Boot and Keycloak both in docker containers. I started with Keycloak with mysql as db running in docker. Then i added my realm (SpringBootKeycloak), my client (testclient), and a user with role ‘user’. After that i added spring-security to my Spring-boot-application. And edited my application.yml accoring to that i added my SecurityConfig: Running my