I have an end-point called authenticate , this endpoint is given to antMatchers(“/authenticate”) to skip authorization for this end-point, but it still checks for the authentication. code: Answer I have an update regarding the issue. In my case, I had a problem with a function singWith() that was …
Tag: spring-boot
Mongo DB Aggregation with Count for Specific Conditions and filter by Date Range which Outputs a Projection Doesn’t work as Expected
Please consider that I’m a beginner to MongoDB and I need to retrieve data from MongoDB database in somewhat complex query format. I’ve referred several Questions and Answers published in the community but my expected query was much complex due to some complex counts operations for certain conditi…
Spring Rest Template always return 500
i use Rest Template to consume a rest web service, However i always get 500 although when I test with postman i get 200 Here is Rest template code : Postman response : RestTemplate Error : Answer Try passing the array in one parameter rsargs[] and not in two as you do.
How to initialize an empty Mono Class object in reactive programming?
I am learning reactive and I wanted to know how to initialize a Mono object, like in Java when:User usr=new User(). How to create a Mono object of this similar class? Answer There are different ways you can create an object. Checkout this link for better understanding https://projectreactor.io/docs/core/relea…
Secure a Java web app using the Spring Boot Starter for Azure Active Directory JWT token algorithm problem
I’m created java web application using spring boot starter for azure active directory step by step like is described in:https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-active-directory My application with my azure account work fin…
RedirectAttributes not working in SpringBoot project
I am trying to set up RedirectAttributes, but nothing happens when I do so. Here is my controller: This is a SpringBoot project, and since it is the Umbrella over Spring MVC, then I assumed I could use RedirectAttributes. So, what is going on? When I hit this end point, I am returned: redirect:uploadStatus An…
Multiple ‘as-value’ properties defined
I want to create a ENUM which holds different statuses for possible database values and use them also to generate possible drop down statuses in FE: Full code: https://github.com/rcbandit111/Search_specification_POC/blob/main/src/main/java/org/merchant/database/service/businesscustomers/BusinessCustomersStatu…
Spring Boot MongoDB: Can @GeneratedValue and @Column annotations be used?
I have been learning how to use MongoDB in Spring Boot; for this purpose I am trying to build a service that allows sending posts and commenting on posts in a forum. Currently I have created a model class for forum posts: In RDBMS like PostgreSQL I would use @GeneratedValue to automatically generate ID value …
Why can’t Postman find my Spring REST API?
I created a very basic Spring Boot project with REST APIs. I tried connecting it to my Angular app but it was getting some CORS security error so I switched to Postman. I’m trying to test it using Postman but I keep receiving a 404 not found error on Postman. Why am I not able to connect to my backend
Spring boot Bean annotation and instance variable flow in Configuration
I am new to the spring boot framework and I have some confusion regarding the @Bean annotation and how the instance variable gets changed by the Bean. I have a below example and if someone can answer my questions will be really helpful: If I am defining restTemplate in my instance variable will userRestTempla…