Skip to content

Commit 116bf31

Browse files
committed
add transient keyword for data persistence if need..
1 parent a5087a4 commit 116bf31

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/com/example/dodi/Person.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import org.springframework.beans.factory.annotation.Autowired;
44
import org.springframework.beans.factory.annotation.Configurable;
5-
import org.springframework.transaction.annotation.Transactional;
65

76

87
/**
@@ -15,8 +14,7 @@ public class Person {
1514
private Integer age;
1615

1716
@Autowired
18-
@Trans
19-
private LoveRepository loveRepository;
17+
private transient LoveRepository loveRepository;
2018

2119
public Person(String name, Integer age) {
2220
this.name = name;

0 commit comments

Comments
 (0)