JAVA-30693 :- Upgrade Spring Cloud vault to latest Spring Cloud (#15746)
This commit is contained in:
parent
d64c084623
commit
1a94ba4005
|
@ -77,7 +77,7 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<spring-cloud.version>2020.0.3</spring-cloud.version>
|
||||
<spring-cloud.version>2023.0.0</spring-cloud.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -18,7 +18,7 @@ public class AccountResource {
|
|||
|
||||
Account acc = repo.findById(id).orElse(null);
|
||||
if ( acc != null ) {
|
||||
return new ResponseEntity<Account>(acc, HttpStatus.OK);
|
||||
return new ResponseEntity<>(acc, HttpStatus.OK);
|
||||
}
|
||||
else {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
|
||||
|
|
|
@ -28,10 +28,10 @@ public class SecretResource {
|
|||
String value = env.getProperty(key);
|
||||
|
||||
if ( value != null ) {
|
||||
return new ResponseEntity<String>(value, HttpStatus.OK);
|
||||
return new ResponseEntity<>(value, HttpStatus.OK);
|
||||
}
|
||||
else {
|
||||
return new ResponseEntity<String>("not found", HttpStatus.NOT_FOUND);
|
||||
return new ResponseEntity<>("not found", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue