below is a sample class:
AAAA.java
1 package tp.domain;
2
3 import org.springframework.beans.factory.annotation.Value;
4 import org.springframework.roo.addon.javabean.RooJavaBean;
5 import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
6 import org.springframework.roo.addon.tostring.RooToString;
7
8 @RooJavaBean
9 @RooToString
10 @RooJpaActiveRecord
11 public class AAAA {
12
13 @Value("true")
14 private Boolean a;
15 }
AAAA_Roo_JavaBean.aj
4 package top.tap.domain;
5
6 import top.tap.domain.AAAA;
7
8 privileged aspect AAAA_Roo_JavaBean {
9
10 public Boolean AAAA.getA() {
11 return this.a;
12 }
13
14 public void AAAA.setA(Boolean a) {
15 this.a = a;
16 }
17
18 }
I like to modify getter setter via entity class (AAAA.java). Can i do it?
Yes. Run the Roo Shell, either through Eclipse/STS if you are using it, or command line if not. Add the getters/setters you want to over-write, and the Roo Shell will see this and remove the conflicting getters/setters from the .aj file.