Coder Social home page Coder Social logo

clidemo's Introduction

SpringShell CLI Demo

License: GPL v3

Sample Command line interpreter (CLI) demo app developed with Spring Shell library.

Banner

How to use this repository?

Master branch contains current/final state of the the CLI demo, while particular branches, for example part1 contain code relevant for specific part of the tutorial (ie. Part 1).

Happy coding!

Setup (First time)

  1. Clone the repository: git clone [email protected]:dmadunic/clidemo.git
  2. Build project with: ./gradlew clean build

Now you can run it by executing the following command:

./run-cli.sh

(Manual) Release new version

Make sure that file gradle.properties in the folder ${USER_HOME}/.gradle/ contains the following two variables defined:

  • github_username
  • github_password : personal github token (PAT) to be used to install/update packages

For more on creating personal github token (PAT) see this link

  1. Commit and push everything
  2. ./gradlew release

And simply follow the instructions on the console

Changelog

Contributors

  • Domagoj Madunić

(c) AG04 Innovative Solutions d.o.o. (2022)

clidemo's People

Contributors

dmadunic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

clidemo's Issues

The dependencies of some of the beans in the application context form a cycle:

Hi dmadunic, thanks for you project share. I have a problem if you can help.
If I create a new Command that autowired InputReader, I got this error below:

The dependencies of some of the beans in the application context form a cycle:

   testCommand (field com.yiwu.command.shell.InputReader com.yiwu.command.commands.TestCommand.inputReader)
┌─────┐
|  inputReader defined in class path resource [com/yiwu/command/config/SpringShellConfig.class]
↑     ↓
|  org.springframework.shell.jline.JLineShellAutoConfiguration (field private org.springframework.shell.Shell org.springframework.shell.jline.JLineShellAutoConfiguration.shell)
↑     ↓
|  shell
↑     ↓
|  userCommand (field com.yiwu.command.shell.InputReader com.yiwu.command.commands.UserCommand.inputReader)
``

cat TestCommand

@ShellComponent
public class TestCommand {

@Autowired
ShellHelper shellHelper;

@Autowired
InputReader inputReader;

@Autowired
ProgressBar progressBar;

@Autowired
ProgressCounter progressCounter;

}

Issue with Japanese language

I have following text in the default and Japanese properties file.

messages.properties
start.notes=Enter to Initialize.

messages_ja.properties
start.notes=を入力して初期化します。

And we using shellHelper.print method to show the message on the windows command prompt. It is working fine with the english message but when the locale is Japanese some junk chars are being visible on the command prompt instead of above shown japanese text.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.