Extract autoconfig

- Create separate spring-shell-autoconfigure and keep
  all autoconfig features there.
- Fixes #329
This commit is contained in:
Janne Valkealahti
2021-12-19 12:31:22 +00:00
parent a2f3dd9ed8
commit 5dcdc4c185
21 changed files with 133 additions and 56 deletions

View File

@@ -1,38 +0,0 @@
/*
* Copyright 2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.shell.jcommander;
import com.beust.jcommander.JCommander;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Bean;
/**
* Registers JCommanderParameterResolver and supporting beans as appropriate.
*
* @author Eric Bottard
*/
@Configuration
@ConditionalOnClass(JCommander.class)
public class JCommanderParameterResolverAutoConfiguration {
@Bean
public JCommanderParameterResolver jCommanderParameterResolver() {
return new JCommanderParameterResolver();
}
}

View File

@@ -1,2 +0,0 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.springframework.shell.jcommander.JCommanderParameterResolverAutoConfiguration