Replace remaining getters & setters with Lombok annotations.
authorMichael Winsauer <e1429715@student.tuwien.ac.at>
Mon, 10 Dec 2018 21:01:30 +0000 (22:01 +0100)
committerMichael Winsauer <e1429715@student.tuwien.ac.at>
Mon, 10 Dec 2018 21:01:30 +0000 (22:01 +0100)
service-twitter/src/main/java/at/aic18/g6t4/servicetwitter/configuration/Twitter4jProperties.java

index 3196f98c9150c35507f1245f27371ebde6cd8c8e..8e2ae24fb11069a356b57a5ccb5cfb1aaa9200fd 100644 (file)
@@ -1,5 +1,7 @@
 package at.aic18.g6t4.servicetwitter.configuration;
 
+import lombok.Getter;
+import lombok.Setter;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.validation.annotation.Validated;
 
@@ -8,23 +10,15 @@ import javax.validation.constraints.NotEmpty;
 
 @ConfigurationProperties(prefix = "twitter4j")
 @Validated
+@Getter
+@Setter
 public class Twitter4jProperties {
 
     @Valid private final OAuth oauth = new OAuth();
     private boolean debug = false;
 
-    public OAuth getOauth() {
-        return oauth;
-    }
-
-    public boolean isDebug() {
-        return debug;
-    }
-
-    public void setDebug(boolean debug) {
-        this.debug = debug;
-    }
-
+    @Getter
+    @Setter
     public static class OAuth {
 
         @NotEmpty private String consumerKey;
@@ -32,38 +26,6 @@ public class Twitter4jProperties {
         @NotEmpty private String accessToken;
         @NotEmpty private String accessTokenSecret;
 
-        public String getConsumerKey() {
-            return consumerKey;
-        }
-
-        public void setConsumerKey(String consumerKey) {
-            this.consumerKey = consumerKey;
-        }
-
-        public String getConsumerSecret() {
-            return consumerSecret;
-        }
-
-        public void setConsumerSecret(String consumerSecret) {
-            this.consumerSecret = consumerSecret;
-        }
-
-        public String getAccessToken() {
-            return accessToken;
-        }
-
-        public void setAccessToken(String accessToken) {
-            this.accessToken = accessToken;
-        }
-
-        public String getAccessTokenSecret() {
-            return accessTokenSecret;
-        }
-
-        public void setAccessTokenSecret(String accessTokenSecret) {
-            this.accessTokenSecret = accessTokenSecret;
-        }
-
     }
 
 }