Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
try fix MSI with App Service
Browse files Browse the repository at this point in the history
  • Loading branch information
saragluna committed Feb 26, 2020
1 parent 45f5d76 commit 11a0148
Showing 1 changed file with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for
* license information.
*/
package com.microsoft.azure.keyvault.spring;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.context.config.ConfigFileApplicationListener;
import org.springframework.boot.env.EnvironmentPostProcessor;
import org.springframework.core.Ordered;
import org.springframework.core.env.ConfigurableEnvironment;

public class IncreaseStartupTimeHelper implements EnvironmentPostProcessor, Ordered {

public static final int DEFAULT_ORDER = ConfigFileApplicationListener.DEFAULT_ORDER;
private int order = DEFAULT_ORDER;

@Override
public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) {
try {
Thread.sleep(100_000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}

@Override
public int getOrder() {
return order;
}

}

0 comments on commit 11a0148

Please sign in to comment.