JavaClientCli.CdsClientShell.mustache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codegen Show documentation
Show all versions of codegen Show documentation
This artefact generates other artefacts such as API client, API server out of API Model
{{>licenseInfo}}
package {{invokerPackage}};
import au.org.consumerdatastandards.client.cli.support.ApiClientOptions;
import org.jline.utils.AttributedString;
import org.jline.utils.AttributedStyle;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.shell.jline.PromptProvider;
@SpringBootApplication(exclude={DataSourceAutoConfiguration.class})
public class CdsClientShell {
public static void main(String[] args) {
SpringApplication.run(CdsClientShell.class, args);
}
@Bean
public PromptProvider myPromptProvider() {
return () -> new AttributedString("cds-client:>", AttributedStyle.DEFAULT.foreground(AttributedStyle.YELLOW));
}
@Bean
public ApiClientOptions apiClientOptions() {
return new ApiClientOptions();
}
}