FIX:: application classes server+client
This commit is contained in:
@@ -4,19 +4,24 @@ import javafx.fxml.FXMLLoader;
|
|||||||
import javafx.scene.Parent;
|
import javafx.scene.Parent;
|
||||||
import javafx.scene.Scene;
|
import javafx.scene.Scene;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import org.slf4j.Logger;
|
//import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
//import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.context.ConfigurableApplicationContext;
|
import org.springframework.context.ConfigurableApplicationContext;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class Application extends javafx.application.Application {
|
public class Application extends javafx.application.Application {
|
||||||
private static ConfigurableApplicationContext springContext;
|
private static ConfigurableApplicationContext springContext;
|
||||||
private static final Logger log = LoggerFactory.getLogger(Application.class);
|
// private static final Logger log = LoggerFactory.getLogger(Application.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This (main) method starts launch.
|
||||||
|
* @param args the arguments
|
||||||
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
launch(args);
|
launch(args);
|
||||||
}
|
}
|
||||||
@@ -33,11 +38,19 @@ public class Application extends javafx.application.Application {
|
|||||||
return loader.load();
|
return loader.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method initializes the application.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void init() throws Exception {
|
public void init() {
|
||||||
springContext = SpringApplication.run(Application.class);
|
springContext = SpringApplication.run(Application.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method opens the login window.
|
||||||
|
* @param primaryStage the login window
|
||||||
|
* @throws Exception in case fxml file is not found
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void start(Stage primaryStage) throws Exception {
|
public void start(Stage primaryStage) throws Exception {
|
||||||
Parent rootNode = load(this.getClass().getClassLoader().getResource("fxml/LoginWindow.fxml"));
|
Parent rootNode = load(this.getClass().getClassLoader().getResource("fxml/LoginWindow.fxml"));
|
||||||
@@ -47,8 +60,11 @@ public class Application extends javafx.application.Application {
|
|||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method stops the application.
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void stop() {
|
public void stop() {
|
||||||
springContext.stop();
|
springContext.stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method starts the server.
|
||||||
|
* @param args the arguments
|
||||||
|
*/
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(Application.class, args);
|
SpringApplication.run(Application.class, args);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user