// Path: src/main/java/exception/FooException.java
// public class FooException extends Exception {
// 
//   public FooException() {
//     super();
//   }
// 
//   public FooException(String message) {
//     super(message);
//   }
// 
//   public FooException(String message, Throwable cause) {
//     super(message, cause);
//   }
// 
//   public FooException(Throwable cause) {
//     super(cause);
//   }
// 
//   protected FooException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
//     super(message, cause, enableSuppression, writableStackTrace);
//   }
// 
// }


import exception.FooException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import java.util.List;
package manual;



/**
 * Created by qianjia on 2017/1/22.
 */
@Component
public class FooServiceImpl implements FooService {

  private final static Logger LOGGER = LoggerFactory.getLogger(FooServiceImpl.class);

  private final JdbcTemplate jdbcTemplate;

  public FooServiceImpl(JdbcTemplate jdbcTemplate) {
    this.jdbcTemplate = jdbcTemplate;
  }

  @Override
  @Transactional(isolation = Isolation.DEFAULT)
// Path: src/main/java/exception/FooException.java
// public class FooException extends Exception {
// 
//   public FooException() {
//     super();
//   }
// 
//   public FooException(String message) {
//     super(message);
//   }
// 
//   public FooException(String message, Throwable cause) {
//     super(message, cause);
//   }
// 
//   public FooException(Throwable cause) {
//     super(cause);
//   }
// 
//   protected FooException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
//     super(message, cause, enableSuppression, writableStackTrace);
//   }
// 
// }


// Path: src/main/java/manual/FooServiceImpl.java
import exception.FooException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import java.util.List;

package manual;



/**
 * Created by qianjia on 2017/1/22.
 */
@Component
public class FooServiceImpl implements FooService {

  private final static Logger LOGGER = LoggerFactory.getLogger(FooServiceImpl.class);

  private final JdbcTemplate jdbcTemplate;

  public FooServiceImpl(JdbcTemplate jdbcTemplate) {
    this.jdbcTemplate = jdbcTemplate;
  }

  @Override
  @Transactional(isolation = Isolation.DEFAULT)
  public void insert(boolean rollback, String... names) throws FooException {