Friday, August 17, 2018

How to use enum in java

package com.javasampleapproach.angularjpamysql.controller;

public enum EnumTest {

    CODE01("01"),
    CODE02("02"),
    CODE03("03"),
    CODE04("04"),
    CODE01DESC("Retail Customer"),
    CODE02DESC("Retail Customer"),
    CODE03DESC("Retail Customer"),
    CODE04DESC("Retail Customer");

    private final String description;

    private EnumTest(String description) {
        this.description = description;
    }

    @Override    public String toString() {
        return description;
    }
}


package com.javasampleapproach.angularjpamysql.controller;

public class EnumCaller {
    public static void main(String args[]){
        System.out.println(EnumTest.CODE01);
        System.out.println(EnumTest.CODE01DESC);
    }
}

Output

01
Retail Customer

Thursday, August 16, 2018

SSL - Secure Socket Layer

01. HTTPS - Hypertext Transfer Protocol for Secure
02. SSL      - Secure Socket Layer




02. SSL - Secure Socket Layer

      In this case, they use public and private key theory (Something uses public key cryptography).
      The server has private key and website has a public key.
      A public key is known to your server and available in the public domain. It can be used to encrypt any message. Someone send a message to the server through this website then the website can encrypt the message. The server can decrypt the message using the private key. 

More Info - globalsign.com

Sunday, August 5, 2018

Spring JPA + MySQL + AngularJS example | Spring Boot

https://grokonez.com/spring-framework/spring-mvc/spring-jpa-mysql-angularjs-example-spring-boot#comment-8740