While integrating swagger-ui with a reactive spring project generated using JHipster 7.1.0 for Java 11. I added the below dependencies. The application has below dependencies of swagger POM dependencies Apart from that we added a configuration SwaggerConfig.java Please share your feedback or inputs if you hav…
Tag: spring-boot
Spring Security: error while loading keystore
I have a working spring boot application, when I do configure it to run in SSL mode as follow: Configuration, which is working for a similar spring boot application and exact same keystore It throws following Exception: Answer Apparently, this exception happens when you target a directory instead of the actua…
How to setServletPath() in Spring Junit WebTestClient?
This creates a MockHttpServletRequest that is send to the @RestContoller servlets. Problem: my servlets make use of HttpServletRequest.getServletPath(), but which is always empty using the WebTestClient approach above. Question: how can I explicit set the servletPath in my junit tests? Answer I could solve it…
How to implement configuration to use oracle/postgreSQL dataSource with spring+mybatis framework?
Background: spring + mybatis + oracle data source Requirement: support postgreSQL data source exchange with minimum code change Example: Current: controllerA -> ServiceA -> daoA -> A.xml (oracle) Now need: we can configure use oracele/postgreSQL database source If configure use postgreSQL: controller…
Is there a way to @Autowire non overridden methods?
I have an interface that is implemented by multiple classes, and these classes also have some extra methods. If I autowire the class. Is there a way I can autowire these extra methods? Example- Interface Service 1 Service 2 If I try to directly Autowire the service like this- then I am getting error something…
format a json of a class in spring
I am new with spring and I want the json response of my class public class Mapping { public String name; public Object value; } be changed from {“name” : ‘value of field name’, “value”: ‘value of field value’} to {‘value of field name’ : ‘value…
Getting Below Jackson exception while building the project
Getting Below build exception while migrating the Springboot project from spring 1.1.1 release to 2.3.12 release . Please help here. Answer This issue seems to be related to a version mismatch. This method was removed some time ago. There is a closed issue for this on swagger plug-in https://github.com/swagge…
enabling Elasticsearch in JHipster results in UnsatisfiedDependencyException: Error creating bean with name ‘userService’
I’ve been trying to build an app with JHipster that can use some advanced filtering, in particular ElasticSearch. Why does it fail when I run it out of the box, without even editing the project ? I am running the following software in Windows 10: Java v15.0.2 node v14.17.4 NPM 6.14.14 Same happens in Ub…
Spring-Boot MVC JPA Filters
Let me start by saying I’m fairly new to Spring Boot so apologies if I’m making a silly mistake somewhere. I am trying to retrieve the value of my form post using @RequestParam so I can utilize it in a JPA query to return kids who have a specific pet type. I’ve done other JPA queries and had…
Spring Boot Actuator – Get your own /info data
Is there a way to get your own /info response from the service? I am having one service that is exposed to frontend and I would like to aggregate /info responses from all of the internal services, and also add my own. However, the only option to get my own data is to call myself … And I would like