-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppCommandLineRunner.java
More file actions
36 lines (28 loc) · 935 Bytes
/
AppCommandLineRunner.java
File metadata and controls
36 lines (28 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.penapereira.example.constructs.app;
import java.awt.EventQueue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
import com.penapereira.example.constructs.app.properties.Messages;
import com.penapereira.example.constructs.app.ui.MainWindow;
@Component
public class AppCommandLineRunner implements CommandLineRunner {
private static Logger log = LoggerFactory.getLogger(AppCommandLineRunner.class);
@Autowired
MainWindow main;
@Autowired
Messages msg;
@Override
public void run(String... args) throws Exception {
EventQueue.invokeLater(() -> {
main.initializeFrame();
main.setVisible(true);
});
log.info(msg.getSeparator());
log.info(msg.getGreeting());
log.info(msg.getHomeUrl());
log.info(msg.getInstructions());
}
}