This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 460
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
...-test-application/src/main/java/com/microsoft/azure/config/IncreaseStartupTimeHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
||
} |