Skip to content

Commit 2fdd45a

Browse files
committed
Switch to ApplicationConversionService
- ApplicationConversionService extends FormattingConversionService and defines some additional default converters like StringToFileConverter which makes `script` command work under native with given file type option. - Fixes #960
1 parent 51f49f7 commit 2fdd45a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

spring-shell-autoconfigure/src/main/java/org/springframework/shell/boot/SpringShellAutoConfiguration.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2022 the original author or authors.
2+
* Copyright 2017-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,7 +27,6 @@
2727
import org.springframework.context.annotation.Bean;
2828
import org.springframework.context.annotation.Import;
2929
import org.springframework.core.convert.support.DefaultConversionService;
30-
import org.springframework.format.support.FormattingConversionService;
3130
import org.springframework.shell.ResultHandler;
3231
import org.springframework.shell.ResultHandlerService;
3332
import org.springframework.shell.Shell;
@@ -48,7 +47,7 @@ public class SpringShellAutoConfiguration {
4847
@Bean
4948
@ConditionalOnMissingBean
5049
public ShellConversionServiceSupplier shellConversionServiceSupplier(ApplicationContext applicationContext) {
51-
FormattingConversionService service = new FormattingConversionService();
50+
ApplicationConversionService service = new ApplicationConversionService();
5251
DefaultConversionService.addDefaultConverters(service);
5352
DefaultConversionService.addCollectionConverters(service);
5453
ApplicationConversionService.addBeans(service, applicationContext);

0 commit comments

Comments
 (0)