title: Spring boot @Transactional doesn't work
body: <p>I had add @Transactional on the method in service layer.</p>
  
  <pre><code>@Transactional(readOnly = false)
  public void add(UserFollow uf){
      UserFollow db_uf = userFollowRepository.findByUserIdAndFollowUserId(uf.getUserId(), uf.getFollowUserId());
      if(db_uf == null) { 
          userFollowRepository.save(uf);      
          userCountService.followInc(uf.getFollowUserId(), true);
          userCountService.fansInc(uf.getUserId(), true);
  
          throw new RuntimeException();// throw an Exception
      }
  }
  </code></pre>
  
  <p>userFollowRepository.save(uf);  still save seccessful，doesn't rollback...</p>
  
  <p>i enable transaction manager on the Application.</p>
  
  <pre><code>@Configuration  
  @ComponentScan 
  @EnableAutoConfiguration  
  @EnableJpaRepositories
  @EnableTransactionManagement
  public class Application {  
  
      @Bean
      public AppConfig appConfig() {
         return new AppConfig();
      }
  
      public static void main(String[] args) {  
         SpringApplication.run(Application.class);  
      }  
  }  
  </code></pre>
  
  <p>i move @Transactional to Control layer, it works, the code:</p>
  
  <pre><code>@Transactional
  @RequestMapping(value="following", method=RequestMethod.POST)
  public MyResponse follow(@RequestBody Map&lt;String, Object&gt; allRequestParams){
      MyResponse response = new MyResponse();
  
      Integer _userId = (Integer)allRequestParams.get("user_id");
      Integer _followUserId = (Integer)allRequestParams.get("follow_user_id");
  
  
  
      userFollowService.add(_userId, _followUserId); //this will throw an exception, then rollback
  
  
      return response;
  }
  </code></pre>
  
  <p>can anyone tell me reason, thanks！</p>