I was having a similar error to the one found here and also here. I attempted to use @EnableAutoConfiguration to fix the error as was suggested, but IntelliJ gives me an error and says “Name expected”. I am unsure what exactly is causing this problem. One possible difference is that I am working i…
Tag: spring-boot
Spring boot application with spring data cassandra failing to start
I have a spring boot application with spring web & spring data cassandra as dependencies. And I have a main method in a class annotated with @SpringBootApplication. I run this application & run into the below error. I am guessing this might be a some dependency related problem, but can’t figure …
Spring Boot OAuth2.0 with Azure Authentication Error – Missing required “user name” attribute name in UserInfoEndpoint for Client Registration: azure
I am trying to login using correct credentials and I am getting following error. I have created Azure AD B2C application following spring starters described on Azure website. User created in Azure Active Directory is member of two groups test2 and test3. I have another spring application, authentication and a…
Null repository even with @Autowired implemented
I have the following controller. The following line works just fine: user = userRepository.selectUserByLogin(name); It correctly returns the user. Now I want to move that code to a getLoggedUser method of a “Utilities” class. This is how I did it. Controller Utilities But when that is executed I&#…
Duplicates in Output Java Spring Boot JPA
I’m working on an application with following Entities and code: The RestController for MotionPicture: My DB Table: clip columns: id(1-100 unique), date, size Table: motion_picture columns: id(1-100 unique), date, size, duration association table: motion_picture_clips columns: motion_picture_id (1-100 ra…
I have created a spring boot with DTO, Entity and also not able to store it
I have created a spring boot with DTO, Entity and also generating entity from dto and vice versa but the data is not getting stored in the Postgres sql when i am trying to get the data its is showing null but creation is happing First is the controller class Now the StudentDetailDto class now the StudenDto cl…
Is there a way to extend the Spring Actuator logger and invoke it from my own controller?
Is there a way to extend the Spring Actuator logger and invoke it from my own controller, so that I can do some security validations? For example, something like this: Answer You can secure the endpoint using Spring Security. See Securing HTTP Endpoints. If Spring Security is not an option and you do want to …
How to trigger dynamic scheduling jobs in Java and cancel them?
How can I invoke a job dynamatically and cancel them at ease? Can I trigger a delayed task that runs at a specific moment, and cancel them if the moment has not passed by, just behaving like the alarm clock? Answer I have found another enterprise job-scheduling framework for this task, which is called PowerJo…
Querying using class in Spring
i’m trying to do this query List<Product> findProductByCategory_CategoryNameAndPriceBetween(String category, double min, double max); but the return of the query is an empty list. What am I doing wrong? I also tried without the underscore between Category and Category Name. This are the class cate…
Spring WebFlux – Why I have to wait for WebClient response?
I have a my WebClient class as per below: After execution I get this on my console: Question: If I comment Thread.sleep(1000); then I dont get any response. Why do I need to wait for the response? Answer Your code is working with Thread.sleep(1000); because you are blocking the parent thread for some time and…