Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 7 months ago. Improve this question ExcelToJson converter The method works correctly, but at the output it produces an array, w…
Tag: spring-boot
How to get list of Map data using JDBCTemplate.queryForMap
How I can get proper return type of List<Map<String, Object>> mapList = jdbctemplate.queryForList(query)); Where my query is “SELECT * FROM table_name;”. Can anyone help me? Answer You can use the following snippet to get the required map from the list: mapList.stream().collect(Collect…
Multiple authentication servers for my OAuth 2 resource server
I have implemented a simple resource server with Spring Boot and Spring Oauth2 with Google as authentication server: How do I add a few more authentication servers like Github, Facebook, or Twitter? Right now I am able to generate id_token and access_token for Google authentication but I am not sure if Github…
How to make RethinkDB to call a java function whenever new insertion happens?
Hello all, I am new to Rethink-db can anyone help me with this as i mentioned in above query. I am creating one java service with Rethink-db so whenever new entries inserted into Rethink-db a java method should call by Rethink-db itself with data that i inserted. And is this possible to achieve it? Thanks. An…
How to handle exceptions in event handler in Axon
I am building a monolith project using Axon framework. I have a method here that dispatches an event And this is my event handler that might throw an exception My question is, how should I handle the exception? I thought of two things: Should I dispatch an event from the event handler to reverse the transacti…
Custom Repository Implementation is not being recognized
I am currently working on a project where I have created the following custom Repository: The print statement “I got called with: ” never gets called. So for whatever reason Spring Boot is not running the method through my custom implementation. Any suggestions? Any help is much appreciated Edit: …
How to fix Thymeleaf th:field unexpected error
I am new to Spring Boot and Thymeleaf. I tried to follow some example but got error as below with no any ideas… My Spring Boot version is 2.7.1 and Java 17 entity: controller: view: The th:field will get 500 internal error when I open this web page…. I’ve google and take a look in Thymeleaf …
Best way to save and update entity Parent and child using spring data jpa
I’m facing some behaviour about spring data jpa and I need to understand. consider this : Document Template Service First => I created the template And When I created a new document for instance with this data configuration I’m getting this error detached entity passed to persist. So to resolve…
Exclude fields from Java object using Spring
I have two endpoint who use the same model class (Cars). For the searchBigList endpoint I would like to retrieve all car fields and for searchCarSmallList endpoint I would like to retrieve just 3 fields. I tried to do it with @JsonView annotation but it was not working for me. Anyone have better idea how to d…
Java Specific webclient connect timeout per request
I have to call different urls with different connection timeout with webclient. But i found that we can set connect timeout globally only and not per resquest .. what to do please to set this timeout on a request without creating a new weblient each time. Answer You need to instantiate one webclient per url. …