Spring Transaction

http://static.springsource.org/spring/docs/2.0.x/reference/transaction.html

 

@Transactional(readOnly = true)
public class DefaultFooService implements FooService {

    public Foo getFoo(String fooName) {
        // do something
    }

    // these settings have precedence for this method
    @Transactional(readOnly = false, propagation = Propagation.REQUIRES_NEW)
    public void updateFoo(Foo foo) {
        // do something
    }
}
 

 

 

你可能感兴趣的:(spring,html)