title: Exception are not getting caught inside method annotate with @Transactional
body: <p>Calling update() from Controller in spring boot annotate with @Transactional and this update() calls update2(). So, when I try to save duplicate values into my database using update2() it don't throw exception to update() instead it goes to Controller method. I want to handle exception in update().</p>
  
  <pre><code>@Transactional(rollbackFor = Exception.class)
      public String update()
      {
          try 
          {
              return update2();
          }
          catch (Exception e) {
              return "Exception in update()";
          }
      }
  
  
      public String update2() throws Exception
      {
  
          List&lt;Employee&gt; l = repo.findAll();
              for(int i=0 ; i&lt;2 ; i++)
              {
                  if(i==0)
                      l.get(i).setUsername("duplicate_value");
                  else
                      l.get(i).setUsername("unique_value");
              repo.save(l.get(i));
              }
  
          return "success";
      }
  </code></pre>