title: CLI-Spring Shell in IntelliJ
body: <p>I am working on a CLI Spring shell code in IntelliJ.
  I  run it and give some parameters. But when I type insert and press enter, console doesn't take it and it appears as if nothing happened!</p>
  
  <p>My code:</p>
  
  <pre><code>@Component
  public class HelloWorldCommands implements CommandMarker {
  
      @CliCommand(value = "insert", help = "insert data to ParsEMS DB")
      public void insert() {
          try {
              Class.forName("org.postgresql.Driver");
              Connection con = DriverManager.getConnection("jdbc:postgresql://localhost:5432/ParsEMS", "xxxxxx", "xxxxxxx");
              Statement st = con.createStatement();
              st.executeUpdate("INSERT INTO node (name, destination) VALUES ('b', 200)");
          } catch (Exception e) {
              e.printStackTrace();
          }
          System.out.println("insert to ParsEMS DB");
      }
  }
  
  
  
  public class Main {
      public static void main(String[] args) throws Exception {
          Bootstrap.main(args);
      }
  }   
  </code></pre>
  
  <p>I see below result when I run it;</p>
  
  <p>1.1.0.RELEASE</p>
  
  <p>Welcome to Spring Shell. For assistance press or type "hint" then hit ENTER.</p>
  
  <p>spring-shell></p>