Skip to content

Commit

Permalink
create :: ServiceWithReadOnlyTransaction
Browse files Browse the repository at this point in the history
  • Loading branch information
ta2ye0n committed Apr 7, 2024
1 parent 9665278 commit df3cb19
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.mindway.server.v2.global.annotation;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Service
@Transactional(readOnly = true, rollbackFor = {Exception.class})
public @interface ServiceWithReadOnlyTransaction {
}

0 comments on commit df3cb19

Please sign in to comment.