title: Can't hit same endpoint twice in my Spring-boot app
body: <p>I need to create a kind of compiler that finds and prints first error in a C code. My compiler will be composed of some modules, right now I finished two of them, Lexical Analyzer and Syntactic Analyzer. Lexical Analyzer takes all text and break it in Tokens, tokens being added in a List of tokens. Syntactic Analyzer receives token List and checks that text is written in order: after IF there must be LBAR token, some  expression and RBAR token. Missing one and it will throw a checked error and stop. </p>
  
  <pre><code>
    @PostMapping("/compile")
      public ResponseEntity&lt;String&gt; setInput(@RequestBody String input){
          if(compile(input)) {
              return ResponseEntity.ok("Success");
          }
  
          return ResponseEntity.ok("Compile error");
      }
  
      private boolean compile(String input){
          lexicalAnalyzer = new LexicalAnalyzer(input);
          lexicalAnalyzer.resetCompiler();
  
          line=1;
          while(lexicalAnalyzer.getNextToken()!=END){ }
  
          syntacticAnalyzer = new SyntacticAnalyzer(tokens);
  
          return syntacticAnalyzer.start();
      }
  </code></pre>
  
  <p>Using postman to send a small text in C as String, everything works good until I find first error. For example:</p>
  
  <pre><code>int main(){
  
  }
  </code></pre>
  
  <p>returns Success</p>
  
  <pre><code>int main({
  }
  </code></pre>
  
  <p>returns Compile error and throws "Missing RPAR"</p>
  
  <pre><code>int main){
  }
  </code></pre>
  
  <p>returns Success, should return Compile error and throw "Missing LBAR". Only if I redeploy I will receive a good response.</p>