1. Add dependencies

<dependency>
    <groupId>com.tvd12</groupId>
    <artifactId>ezyfox-server-embedded</artifactId>
    <version>1.1.4</version>
</dependency>

2. Setting an embedded server

2.1 Create a Plugin Entry
public static class HelloPluginEntry extends EzySimplePluginEntry {

    @Override
    protected String[] getScanableBeanPackages() {
        return new String[] {
                "com.tvd12.ezyfoxserver.embedded.test" // replace by your package
        };
    }

}

public static class HelloPluginEntryLoader extends EzyAbstractPluginEntryLoader {

    @Override
    public EzyPluginEntry load() throws Exception {
        return new HelloPluginEntry();
    }
    
}
2.2 Create an App Entry
public static class HelloAppEntry extends EzySimpleAppEntry {

    @Override
    protected String[] getScanableBeanPackages() {
        return new String[] {
                "com.tvd12.ezyfoxserver.embedded.test" // replace by your package
        };
    }

    @Override
    protected String[] getScanableBindingPackages() {
        return new String[] {
                "com.tvd12.ezyfoxserver.embedded.test" // replace by your package
        };
    }
    
}

public static class HelloAppEntryLoader extends EzyAbstractAppEntryLoader {

    @Override
    public EzyAppEntry load() throws Exception {
        return new HelloAppEntry();
    }
    
}
2.3 Setting
EzyPluginSettingBuilder pluginSettingBuilder = new EzyPluginSettingBuilder()
        .name("hello")
        .entryLoader(HelloPluginEntryLoader.class);
        
EzyAppSettingBuilder appSettingBuilder = new EzyAppSettingBuilder()
        .name("hello")
        .entryLoader(HelloAppEntryLoader.class);

EzyZoneSettingBuilder zoneSettingBuilder = new EzyZoneSettingBuilder()
        .name("hello")
        .application(appSettingBuilder.build())
        .plugin(pluginSettingBuilder.build());

EzySimpleSettings settings = new EzySettingsBuilder()
        .zone(zoneSettingBuilder.build())
        .build();

3. Create and Start an Embedded Server

EzyEmbeddedServer server = EzyEmbeddedServer.builder()
        .settings(settings)
        .build();
server.start();

4. An Example

import com.tvd12.ezyfoxserver.embedded.EzyEmbeddedServer;
import com.tvd12.ezyfoxserver.ext.EzyAbstractAppEntryLoader;
import com.tvd12.ezyfoxserver.ext.EzyAbstractPluginEntryLoader;
import com.tvd12.ezyfoxserver.ext.EzyAppEntry;
import com.tvd12.ezyfoxserver.ext.EzyPluginEntry;
import com.tvd12.ezyfoxserver.setting.EzyAppSettingBuilder;
import com.tvd12.ezyfoxserver.setting.EzyPluginSettingBuilder;
import com.tvd12.ezyfoxserver.setting.EzySettingsBuilder;
import com.tvd12.ezyfoxserver.setting.EzySimpleSettings;
import com.tvd12.ezyfoxserver.setting.EzyZoneSettingBuilder;
import com.tvd12.ezyfoxserver.support.entry.EzySimpleAppEntry;
import com.tvd12.ezyfoxserver.support.entry.EzySimplePluginEntry;

public class HelloEmbeddedServer {

    public static void main(String[] args) throws Exception {
        EzyPluginSettingBuilder pluginSettingBuilder = new EzyPluginSettingBuilder()
                .name("hello")
                .entryLoader(HelloPluginEntryLoader.class);
        
        EzyAppSettingBuilder appSettingBuilder = new EzyAppSettingBuilder()
                .name("hello")
                .entryLoader(HelloAppEntryLoader.class);
        
        EzyZoneSettingBuilder zoneSettingBuilder = new EzyZoneSettingBuilder()
                .name("hello")
                .application(appSettingBuilder.build())
                .plugin(pluginSettingBuilder.build());
        
        EzySimpleSettings settings = new EzySettingsBuilder()
                .zone(zoneSettingBuilder.build())
                .build();
        
        EzyEmbeddedServer server = EzyEmbeddedServer.builder()
                .settings(settings)
                .build();
        server.start();
    }
    
    public static class HelloAppEntry extends EzySimpleAppEntry {

        @Override
        protected String[] getScanableBeanPackages() {
            return new String[] {
                    "com.tvd12.ezyfoxserver.embedded.test" // replace by your package
            };
        }

        @Override
        protected String[] getScanableBindingPackages() {
            return new String[] {
                    "com.tvd12.ezyfoxserver.embedded.test" // replace by your package
            };
        }
        
    }
    
    public static class HelloAppEntryLoader extends EzyAbstractAppEntryLoader {

        @Override
        public EzyAppEntry load() throws Exception {
            return new HelloAppEntry();
        }
        
    }
    
    public static class HelloPluginEntry extends EzySimplePluginEntry {

        @Override
        protected String[] getScanableBeanPackages() {
            return new String[] {
                    "com.tvd12.ezyfoxserver.embedded.test" // replace by your package
            };
        }

    }

    public static class HelloPluginEntryLoader extends EzyAbstractPluginEntryLoader {

        @Override
        public EzyPluginEntry load() throws Exception {
            return new HelloPluginEntry();
        }
        
    }
    
}