Skip to content

Instantly share code, notes, and snippets.

@gastaldi
Created June 29, 2016 21:46
Show Gist options
  • Save gastaldi/6297a75617afed6618ce52ddcd1113db to your computer and use it in GitHub Desktop.
Save gastaldi/6297a75617afed6618ce52ddcd1113db to your computer and use it in GitHub Desktop.
package org.wildfly.swarm.management.console;
import org.wildfly.swarm.management.ManagementFraction;
import org.wildfly.swarm.spi.api.Fraction;
import org.wildfly.swarm.spi.api.annotations.Configuration;
/**
* Created by ggastald on 29/06/16.
*/
@Configuration
public class ManagementConsoleFraction implements Fraction {
@Override
public void postInitialize(PostInitContext initContext) {
boolean management = initContext.hasFraction("Management");
if (management) {
ManagementFraction fraction = (ManagementFraction) initContext.fraction("Management");
fraction.httpInterfaceManagementInterface(iface -> iface.consoleEnabled(true));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment