Questions tagged [spring-boot-2]
111 questions
0
votes
1 answer
Application.properties not detected by spring boot 2.5.3
I have migrated my project from gradle 5 to 7.1 and spring boot 2.5.3. After i build the jar, i tried to execute the same. Earlier it was working fine. But now, its not detecting the application.properties file. I have tried many solutions in…

Sheljith krishnan
- 335
- 5
- 21
0
votes
2 answers
Springboot2 JPA use DB default sequence for Id
I am using SpringBoot2 for creating microservice. Database table I am using for entity is been defined with default sequence at DB level for the primary key. Like below,
CREATE TABLE EMPLOYEE (
EMP_ID INTEGER GENERATED BY DEFAULT AS IDENTITY (START…

Lolly
- 34,250
- 42
- 115
- 150
0
votes
2 answers
SpringBoot2 data JPA throwing ConstraintViolationException
I am using Spring Boot 2 for creating microservices. I have a scenario to save an entity. In entity for Id column I have added like below
@Id
@GeneratedValue(Strategy=GenerationType.Auto, generator="increment")
@GenericGenerator(name="increment",…

Lolly
- 34,250
- 42
- 115
- 150
0
votes
0 answers
How to disable WebClient verifying the server host name CN entry in the certificate
A hostname verifier is useful when an SSL client connects to an application server on a remote host. This ensures that the hostname in the URL to which the client tries to connects matches with the hostname in the digital certificate that the server…

Cork Kochi
- 1,783
- 6
- 29
- 45
0
votes
1 answer
Spring boot2 path variable validation
I am using spring boot for creating rest services. I need to validate the parameter passed. I have a service like below,
@GetMapping(value="/employee/{Id}")
public EmployeeDTO getEmployeeDetails(@PathVariable String Id) {
...
}
I need to throw…

Lolly
- 34,250
- 42
- 115
- 150
0
votes
0 answers
Config Server stopped propagating changes to the micro-service that was upgraded to Spring Boot 2.4.5
We used to run our micro-services on spring boot 2.2, but we decided to upgrade to the latest SB 2.4.5, in one service we enabled the use of new config profiles.
We use this new feature mostly for local development overrides.
When it comes down to…

Ihor M.
- 2,728
- 3
- 44
- 70
0
votes
1 answer
blocked:mixed-content error after spring boot upgrade
I have upgraded some micro services that talk to each other from Spring Boot 1.5.3 to 2.3.5.
Now when my micro service A calls micro service B, the call fails with the following status
on the network tab of chrome's developer tools…

Akash Sharma
- 330
- 3
- 18
0
votes
0 answers
Spring-Boot @Async: How to figure out actual method name annotation with @Async at runtime?
I need to figure out the @Async method name in TaskDecorator. How do I figure out the method name (asyncMethodWithReturnType) from TaskDecorator or I there a better way to figure out the actual method that is annotated with @Async in Spring Boot…

Bmis13
- 550
- 1
- 8
- 27
0
votes
0 answers
Spring Boot 2 Actuator Config Property Sources Not Found
I've been trying to migrate from Spring Boot 1.x to Spring Boot 2.4.2.
I have a problem with /health endpoint of actuator which says:
"clientConfigServer": {
"status": "UNKNOWN",
"details": {
"error": "no property sources located"
}
}
in…

Patryk Imosa
- 785
- 2
- 10
- 31
0
votes
1 answer
@ActiveProfiles in Spring Test does not support placeholders any longer
I am upgrading from Spring 4.3 to Spring 5.3 and it seems that placeholders are no longer supported for the @ActiveProviles annotation.
The following code worked with the old Spring…

Christian
- 31
- 3
0
votes
0 answers
Springfox Swagger 2 vs 3
Recently Springfox Swagger 3 got released supporting OpenAPI 3. I was using Springfox Swagger 2 quiet a while which gives all the necessary stuffs to document the REST API and nowwhen I upgrade now to 3, I could find the UI is bit changed when…

Alex Man
- 4,746
- 17
- 93
- 178
0
votes
1 answer
Spring Boot 2 security restricting index page
I'm trying to add spring security to a custom Java project, by manually adding all dependencies etc. So far I've been successful, but I (think I) have a problem with my WebSecurityConfigurerAdapter:
@Override
protected void configure(HttpSecurity…

PeteHegn
- 3
- 4
0
votes
1 answer
@ConfigurationProperties don't work in test in Spring Boot 2.4.2
I have an application that works fine in Spring Boot 2.3.8 but the @RestClientTests fails with 2.4.2 because the test objects can not be instantiated because there's no bean of the @ConfigurationProperties (which is created by the…

Martin Schröder
- 4,176
- 7
- 47
- 81
0
votes
2 answers
POST call using context-path not working in spring boot 2.x
I am migrating my spring boot application from 1.5.x to 2.x
I am getting 405 error while making POST call to context path without trailing /
{
"timestamp": "2020-11-04T12:07:19.065+0000",
"status": 405,
"error": "Method Not Allowed",
…

Aviral
- 51
- 9
0
votes
1 answer
Jpos Q2 Server with Spring boot 2.3
We have a existing system with Q2 Server and Spring MVC with following configuration. Q2 server was created when a Httpservlet is initiated and It worked perfectly and spring beans can be autowired withn ISORequestlistner. This is now being…

Supun Athukorala
- 48
- 11