-
Notifications
You must be signed in to change notification settings - Fork 0
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
2 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,18 +1,35 @@ | ||
package com.example.runway; | ||
|
||
import java.util.Arrays; | ||
|
||
import io.swagger.v3.oas.annotations.OpenAPIDefinition; | ||
import io.swagger.v3.oas.annotations.servers.Server; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.boot.context.event.ApplicationReadyEvent; | ||
import org.springframework.context.ApplicationListener; | ||
import org.springframework.core.env.Environment; | ||
|
||
@SpringBootApplication | ||
@Slf4j | ||
@OpenAPIDefinition(servers = {@Server(url = "${server.servlet.context-path}", description = "Default Server URL")}) | ||
public class RunwayApplication { | ||
public class RunwayApplication implements ApplicationListener<ApplicationReadyEvent> { | ||
private final Environment environment; | ||
|
||
public RunwayApplication(Environment environment) { | ||
this.environment = environment; | ||
} | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(RunwayApplication.class, args); | ||
long heapSize = Runtime.getRuntime().totalMemory(); | ||
System.out.println("HEAP Size(M) : "+ heapSize / (1024*1024) + " MB"); | ||
log.info("HEAP Size(M) : "+ heapSize / (1024*1024) + " MB"); | ||
} | ||
@Override | ||
public void onApplicationEvent(ApplicationReadyEvent event){ | ||
log.info("applicationReady status Active Profiles =" + Arrays.toString(environment.getActiveProfiles())); | ||
} | ||
|
||
} |
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