Skip to content
Advertisement

Tag: spring-boot

Failed to determine a suitable driver class spring

When I run my Spring Boot project, I get this error: Description: Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the classpath. If you have

Property file reading error in spring boot

Below is my yml file in spring boot app below value access is working file but when I try to access in below way it gives an error. I checked it gives error only when add “com.cloudimpl.outstack.runtime.EventRepositoryFactory” this part. How can I solve this?? Answer It doesn’t work so. You have list with values under “outstack.providers.com.cloudimpl.outstack.runtime.EventRepositoryFactory”. It means you can

Underscore in model class on Spring Boot

I doing the maintenance of this code please can someone explain what is that notation Post_ in the code below? I know Post is a model that I created, but Post_ with underscore is not in files. I searched but didnt find any information about this. Its a pre generated Spring Boot file? And if so how to create it?

Spring boot yaml property boolean not recognized

I have the following in application.yml: Following field: results in: Parameter 7 of constructor in be.cm.apps.press.perscel3.cron.CronJob required a bean of type ‘java.lang.Boolean’ that could not be found. A bit annoyed by the unexpected issue, clearly the boolean field is set to true. Note that all other fields under the same namespaces are properly filled in, it is literally only the

Spring Boot Patient Application

an image of code for some reason I am trying to have a little API run. Everything runs fine but I have to make an addition and am confused. I have to have it so in the URL when I type “localhost:8080/api/v1/{illness}” it will display the names of the people with that illness…help. I have included the two classes that

OAuth2 authorization code flow: spring-security does not accept the issued access_token

I am learning the OAuth2 authorization code flow. I have my own Authorization Server (AS) which is OpenAM 7.1. The Client is a simple Spring-Boot web application with a static HTML page, I use Spring-Security to protect the HTML page and control the Oauth2 flow. I think that my Authorization Server configuration is correct because AS produces the access_token at

Error creating bean with name ‘batchDataSource’: Requested bean is currently in creation: Is there an unresolvable circular reference?

I have a batch configuration. I saw the batch process is default using InMemoryMap. Instead I need to use the MySQL to send all the execution details by Batch. But when I use the following code I am getting the following error, Error creating bean with name ‘batchDataSource’: Requested bean is currently in creation: Is there an unresolvable circular reference?

Condition fails in Junit5 & Mockito

I am trying to write the test case for my application and I cannot get past a condition even after providing what is expected, from what I know. Here is my test class. My implementation. The test doesn’t go past the if condition. The test does not cover the code after the condition as it turns true all the time.

Spring security application giving No AuthenticationProvider found for org.springframework.security.authentication.UsernamePasswordAuthenticationToken

I am new to spring boot. I am trying to implement a simple spring boot security with userdetailsservice in Spring Tool Suite(STS). Below is the controller I used: And the Web security configuration code: I gave all the required dependencies in pom.xml. So, I have added below line in application.propperties file, and now system is not generating security password. And

Java Rest Template throws java.lang.IllegalArgumentException: Comparison method violates its general contract

I am not using any Comparators/Sorting in my Java code, still it is throwing ” java.lang.IllegalArgumentException: Comparison method violates its general contract!” Exception. Below is the piece of code that throws exception on the restTemplate.exchange line on debugging. Started getting this exception when I changed the version of spring-boot-starter-parent from 2.3.9 to 2.5.3 How should I resolve this? Stack Trace:

Advertisement