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

Commit 11a0148

Browse files
committed
try fix MSI with App Service
1 parent 45f5d76 commit 11a0148

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See LICENSE in the project root for
4+
* license information.
5+
*/
6+
package com.microsoft.azure.keyvault.spring;
7+
8+
import org.springframework.boot.SpringApplication;
9+
import org.springframework.boot.context.config.ConfigFileApplicationListener;
10+
import org.springframework.boot.env.EnvironmentPostProcessor;
11+
import org.springframework.core.Ordered;
12+
import org.springframework.core.env.ConfigurableEnvironment;
13+
14+
public class IncreaseStartupTimeHelper implements EnvironmentPostProcessor, Ordered {
15+
16+
public static final int DEFAULT_ORDER = ConfigFileApplicationListener.DEFAULT_ORDER;
17+
private int order = DEFAULT_ORDER;
18+
19+
@Override
20+
public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) {
21+
try {
22+
Thread.sleep(100_000);
23+
} catch (InterruptedException e) {
24+
e.printStackTrace();
25+
}
26+
}
27+
28+
@Override
29+
public int getOrder() {
30+
return order;
31+
}
32+
33+
}

0 commit comments

Comments
 (0)