当前位置: 首页>>代码示例>>Java>>正文


Java DefaultProfileUtil类代码示例

本文整理汇总了Java中org.jhipster.store.config.DefaultProfileUtil的典型用法代码示例。如果您正苦于以下问题:Java DefaultProfileUtil类的具体用法?Java DefaultProfileUtil怎么用?Java DefaultProfileUtil使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DefaultProfileUtil类属于org.jhipster.store.config包,在下文中一共展示了DefaultProfileUtil类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configure

import org.jhipster.store.config.DefaultProfileUtil; //导入依赖的package包/类
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
    /**
     * set a default to use when no profile is configured.
     */
    DefaultProfileUtil.addDefaultProfile(application.application());
    return application.sources(StoreApp.class);
}
 
开发者ID:oktadeveloper,项目名称:jhipster-microservices-example,代码行数:9,代码来源:ApplicationWebXml.java

示例2: main

import org.jhipster.store.config.DefaultProfileUtil; //导入依赖的package包/类
/**
 * Main method, used to run the application.
 *
 * @param args the command line arguments
 * @throws UnknownHostException if the local host name could not be resolved into an address
 */
public static void main(String[] args) throws UnknownHostException {
    SpringApplication app = new SpringApplication(StoreApp.class);
    DefaultProfileUtil.addDefaultProfile(app);
    Environment env = app.run(args).getEnvironment();
    String protocol = "http";
    if (env.getProperty("server.ssl.key-store") != null) {
        protocol = "https";
    }
    log.info("\n----------------------------------------------------------\n\t" +
            "Application '{}' is running! Access URLs:\n\t" +
            "Local: \t\t{}://localhost:{}\n\t" +
            "External: \t{}://{}:{}\n\t" +
            "Profile(s): \t{}\n----------------------------------------------------------",
        env.getProperty("spring.application.name"),
        protocol,
        env.getProperty("server.port"),
        protocol,
        InetAddress.getLocalHost().getHostAddress(),
        env.getProperty("server.port"),
        env.getActiveProfiles());

    String configServerStatus = env.getProperty("configserver.status");
    log.info("\n----------------------------------------------------------\n\t" +
            "Config Server: \t{}\n----------------------------------------------------------",
        configServerStatus == null ? "Not found or not setup for this application" : configServerStatus);
}
 
开发者ID:oktadeveloper,项目名称:jhipster-microservices-example,代码行数:33,代码来源:StoreApp.java

示例3: getActiveProfiles

import org.jhipster.store.config.DefaultProfileUtil; //导入依赖的package包/类
@GetMapping("/profile-info")
public ProfileInfoVM getActiveProfiles() {
    String[] activeProfiles = DefaultProfileUtil.getActiveProfiles(env);
    return new ProfileInfoVM(activeProfiles, getRibbonEnv(activeProfiles));
}
 
开发者ID:oktadeveloper,项目名称:jhipster-microservices-example,代码行数:6,代码来源:ProfileInfoResource.java


注:本文中的org.jhipster.store.config.DefaultProfileUtil类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。