Java Code Examples for io.micronaut.context.ApplicationContextBuilder#environments()

The following examples show how to use io.micronaut.context.ApplicationContextBuilder#environments() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HttpFunction.java    From micronaut-gcp with Apache License 2.0 5 votes vote down vote up
@Nonnull
@Override
protected ApplicationContextBuilder newApplicationContextBuilder() {
    final ApplicationContextBuilder builder = super.newApplicationContextBuilder();
    builder.deduceEnvironment(false);
    builder.environments(Environment.FUNCTION, Environment.GOOGLE_COMPUTE);
    return builder;
}
 
Example 2
Source File: GoogleFunctionInitializer.java    From micronaut-gcp with Apache License 2.0 5 votes vote down vote up
@Nonnull
@Override
protected ApplicationContextBuilder newApplicationContextBuilder() {
    ApplicationContextBuilder builder = super.newApplicationContextBuilder();
    builder.deduceEnvironment(false);
    builder.environments(Environment.GOOGLE_COMPUTE);
    return builder;
}