Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Update to spring-shell 2.1.x #1026

Merged
merged 1 commit into from
Feb 2, 2022

Conversation

onobc
Copy link
Contributor

@onobc onobc commented Jan 31, 2022

This upgrades to the latest spring-shell.

Fixes #1021

@onobc onobc force-pushed the gh-1021-springshell-proper branch 2 times, most recently from 56cba98 to de378e9 Compare February 1, 2022 19:27
@onobc onobc changed the title WIP spring-shell 2.1.0-SNAPSHOT Update to spring-shell 2.1.x Feb 1, 2022
@@ -37,6 +37,6 @@ public static String basicAuthorizationHeader(String username, String password)
Assert.notNull(username, "The username must not be null.");
Assert.notNull(password, "The password must not be null.");

return "Basic " + new String(Base64.encode((username + ":" + password).getBytes(StandardCharsets.ISO_8859_1)));
return "Basic " + new String(Base64.getEncoder().encode((username + ":" + password).getBytes(StandardCharsets.ISO_8859_1)));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[UNRELATED_DEPRECATION_FIX]

@@ -63,7 +63,7 @@ public Target(String targetUriAsString, String targetUsername, String targetPass
this.targetUri = URI.create(targetUriAsString);
this.skipSslValidation = skipSslValidation;

if (StringUtils.isEmpty(targetUsername)) {
if (!StringUtils.hasText(targetUsername)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[UNRELATED_DEPRECATION_FIX]

SkipperClientProperties skipperClientProperties) {
return new InitializeConnectionApplicationRunner(targetHolder, resultHandler, skipperClientProperties);
}

@Bean
public ApplicationRunner applicationRunner(Shell shell, ConfigurableEnvironment environment) {
return new InteractiveModeApplicationRunner(shell, environment);
public NonInteractiveShellRunnerCustomizer skipperClientArgsFilteringCustomizer() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This customizer is what allows us to delete the custom interactive app runner.

@onobc onobc requested a review from jvalkeal February 1, 2022 19:35
@onobc onobc force-pushed the gh-1021-springshell-proper branch from de378e9 to f9b778e Compare February 1, 2022 19:45
@jvalkeal
Copy link
Contributor

jvalkeal commented Feb 2, 2022

This looks good.

@jvalkeal jvalkeal merged commit d0bc641 into spring-attic:main Feb 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Update spring-shell 2.1.x
2 participants