Skip to content

Commit 77ce130

Browse files
author
kmsoln
committed
[thymeleaf] code enhancement
1 parent cb8f822 commit 77ce130

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎a-thymeleaf/src/main/java/com/labs/thymeleaf/ThymeleafApplication.java‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ public static void main(String[] args) {
1919
}
2020

2121
private static void logServerInfo(ConfigurableApplicationContext context) {
22-
String port = context.getEnvironment().getProperty("server.port");
23-
String contextPath = context.getEnvironment().getProperty("server.servlet.context-path");
22+
var env = context.getEnvironment();
23+
String port = env.getProperty("server.port");
24+
String contextPath = env.getProperty("server.servlet.context-path");
2425

2526
log("Server running at: http://localhost:" + port + contextPath);
2627
}

0 commit comments

Comments
 (0)