I’m using hibernate to read my database datas but i’m having a issue with the relationship of the tables when i run a query. And i don’t find the reason That’s the error: 2021-01-23 18:16:55.427 WARN 1192 — [nio-8080-exec-2] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, …
Tag: spring
Hibernate’s setparameterlist not working for the selectquery
i am trying to set the parameter lTList in the sqlquery with something like this => [‘a’,b’,’c’] but when i SOP after setting the parameter there is no change => “select …. lt in (:ltList) ” what am i doing wrong There is no error but: query constructed : …
Spring Cloud LoadBalancer is currently working with the default cache. You can switch to using Caffeine cache, by adding it to the classpath
Small question regarding a warning. I have a Spring Boot 2.4.2 + Spring Cloud app deployed in Kubernetes. It it behaving well, very happy about it. As the app is calling up to a large number in Kubernetes, I just decided to bring in the spring-cloud-starter-kubernetes-fabric8 dependency. And really, the disco…
How to get trace id and span id in the log4j2, in the format [traceId, spanId ]?
How to get trace id and span id in the log4j2, not the in the [traceId, spanId ] ? Expected Output : [APPNAME,5a59b2372d9a3814,5a59b2372d9a3814] Actual Output : [logLevel=ERROR] — 2021-01-21 11:30:32,489 +0530 — http-nio-8080-exec-1 com.springboot.test.aspect.MyAspect — asnId= – messag…
What package is the actuator base path stored?
I am looking to log all of my Spring-Boot project’s request. My pointcuts work fine for my programming, and I can get the sub paths, but not the base actuator path. com.example.demo…(..) – This works for my programming org.springframework.boot.actuate…(..) – This works for paths …
RestClientTest annotation fails to autocnfigure RestTemplate
I have a class with RestTemplate dependency And in the test I wish to use @RestClientTest for auto configuring the RestTemplate But the test fails with unable to find autowiring candidate for RestTemplate error. Answer In the documentation of @RestClientTest you can read: If you are testing a bean that doesn&…
Which bean is loaded if profile is not set?
Testing the below Spring profile : It seems that com.Test2 is loaded if a Spring profile is not set. Is this the expected behavior ? I’m just trying to understand how Spring loads classes if profiles are set/unset. It seems that if a profile is not set then Spring will create the class if it exists outs…
How to Validate Ordinal Dates?
My julian date is in 7 digit format YYYYDDD. I want to make sure all the scenarios of leap years should be covered. Currently I have put a check on days. Is there any utility validating it ? Answer I want to make sure all the scenarios of leap years should be covered. Currently I have put a check on
Spring-Boot-Security: Custom Authenticator
I am starting with Spring-Boot and have an application with WebSecurity. Its working fine, I have InMemory Authentication with static user/passwords. Now I have no need for DB or LDAP or … But I want to build a custom authenticator that uses dynamic data (e.g. password has current time in it). How to im…
Getting error while using @Autowired in the springboot
I am creating a Springboot project in which I have two service interfaces whom I am injecting in my Controller StudentService public interface StudentService { void addStudent(Student student); …