package com.ds.ce.diy.settings;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;

import javax.annotation.PostConstruct;

@Component
@ConfigurationProperties(prefix = "app")
public class AppSettings {

    private Email email;

    @PostConstruct
    public void init() {
        Assert.notNull(email);
        Assert.notNull(email.registration);
        Assert.notNull(email.registration.getTokenExpiration());
    }

    public Email getEmail() {
        return email;
    }

    public void setEmail(Email email) {
        this.email = email;
    }

    public static class Email {

        private Registration registration;

        public Registration getRegistration() {
            return registration;
        }

        public void setRegistration(Registration registration) {
            this.registration = registration;
        }

        public static class Registration {

            private int tokenExpiration;

            private String subject;

            /**
             * Email Subject
             * @return
             */
            public String getSubject() {
                return subject;
            }

            public void setSubject(String subject) {
                this.subject = subject;
            }

            /**
             * @return Email registration Token Expiry Time in Minutes
             */
            public int getTokenExpiration() {
                return tokenExpiration;
            }

            public void setTokenExpiration(int tokenExpiration) {
                this.tokenExpiration = tokenExpiration;
            }
        }
    }

}

@@ -26,16 +26,60 @@
 tings;%0A%0A
+import lombok.Getter;%0Aimport lombok.Setter;%0A
 import o
@@ -328,16 +328,32 @@
  %22app%22)%0A
+@Getter%0A@Setter%0A
 public c
@@ -597,1171 +597,258 @@
     
-public Email getEmail() %7B%0A        return email;%0A    %7D%0A%0A    public void setEmail(Email email) %7B%0A        this.email = email;%0A    %7D%0A%0A    public static class Email %7B%0A%0A        private Registration registration;%0A%0A        public Registration getRegistration() %7B%0A            return registration;%0A        %7D%0A%0A        public void setRegistration(Registration registration) %7B%0A            this.registration = registration;%0A        %7D%0A%0A        public static class Registration %7B%0A%0A            private int tokenExpiration;%0A%0A            private String subject;%0A%0A            /**%0A             * Email Subject%0A             * @return%0A             */%0A            public String getSubject() %7B%0A                return subject;%0A            %7D%0A%0A            public void setSubject(String subject) %7B%0A                this.subject = subject;%0A            %7D%0A%0A            /**%0A             * @return Email registration Token Expiry Time in Minutes%0A             */%0A            public int getTokenExpiration() %7B%0A                return tokenExpiration;%0A            %7D%0A%0A            public void setTokenExpiration(int tokenExpiration) %7B%0A                this.tokenExpiration = tokenExpiration;%0A            %7D
+@Getter%0A    @Setter%0A    public static class Email %7B%0A%0A        private Registration registration;%0A%0A        @Getter%0A        @Setter%0A        public static class Registration %7B%0A%0A            private int tokenExpiration;%0A%0A            private String subject;
 %0A   

use lombok for Configuration Properties Spring class