Skip to content

Message

seyyed edited this page Jul 31, 2021 · 1 revision

This class Used For Generate Message For All ResourceBundles

Guide

you must create an Enum Or Class And Implement the Key Methode

Example

public enum MessageEnum implements Message {

    SUCCESS {
        @Override
        public String key() {
            return this.name();
        }
    },
    CREATED {
        @Override
        public String key() {
            return this.name();
        }
    };
}

Properties

SUCCESS.code=0
SUCCESS.message=Ok

then You can use the value of your key from all Application such as Application Properties and ..

Clone this wiki locally