This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Shell 3.4.1!spring-doc.cn

Catalog App

Catalog application shows various ways how the Terminal UI Framework can be used. In this section, we discuss how this application works. It can be considered as a reference application as it’s using most of the features available and tries to follow the best practices.spring-doc.cn

Create Scenario

Every Scenario essentially is a sample code of a View as that’s what catalog app demonstrates. In the sample app create a new scenario class under scenario package and implement it as something shown below.spring-doc.cn

@ScenarioComponent(
        name = "Scenario name",
        description = "Scenario short description",
        category = { Scenario.CATEGORY_OTHER })
public class SampleScenario extends AbstractScenario {

    @Override
    public View build() {
        return new BoxView();
    }
}
You need to define all fields, name, description and category with @ScenarioComponent.