package seu;

import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.scene.image.Image;
import javafx.stage.WindowEvent;
import javafx.util.Callback;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class Main extends Application {

    private ConfigurableApplicationContext springContext;
    private Parent rootNode;

    public static void main(final String[] args) {
        Application.launch(args);
    }

//    public static void main(String[] args) {
//        launch( args);
//    }

    @Override
    public void init() throws Exception {
        springContext = SpringApplication.run(Main.class);
        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/view//MyScene.fxml"));
        fxmlLoader.setControllerFactory(new Callback<Class<?>, Object>() {
            @Override
            public Object call(Class<?> requiredType) {
                return springContext.getBean(requiredType);
            }
        });
        rootNode = (Parent) fxmlLoader.load();
    }

    @Override
    public void start(Stage primaryStage) throws Exception {

        Scene Scene = new Scene(rootNode, 600, 400);
        primaryStage.setScene(Scene);
        Scene.getStylesheets().add(
                getClass().getResource("/view//login.css")
                        .toExternalForm());
        primaryStage.getIcons().add(new Image("/images/01.png"));
        primaryStage.setResizable(false);
        primaryStage.show();
    }

    @Override
    public void stop() throws Exception {
        springContext.close();
    }




}
@@ -50,42 +50,8 @@
 on;%0A
-import javafx.event.EventHandler;%0A
 impo
@@ -196,280 +196,8 @@
 ge;%0A
-import javafx.stage.WindowEvent;%0Aimport javafx.util.Callback;%0Aimport org.springframework.boot.SpringApplication;%0Aimport org.springframework.boot.autoconfigure.SpringBootApplication;%0Aimport org.springframework.context.ConfigurableApplicationContext;%0A%0A@SpringBootApplication
 %0Apub
@@ -211,16 +211,17 @@
 ss Main 
+ 
 extends 
@@ -238,246 +238,88 @@
 n %7B%0A
-%0A
     
-private ConfigurableApplicationContext springContext;%0A    private Parent rootNode;%0A%0A    public static void main(final String%5B%5D args) %7B%0A        Application.launch(args);%0A    %7D%0A%0A//    public static void main(String%5B%5D args)
+@Override%0A    public void start(Stage primaryStage) %7B%0A        try
  %7B%0A
-//
         
 laun
@@ -318,204 +318,73 @@
     
-launch( args);%0A//    %7D%0A%0A    @Override%0A    public void init() throws Exception %7B%0A        springContext = SpringApplication.run(Main.class);%0A        FXMLLoader fxmlLoader = new FXMLLoader(getClass()
+    Parent root = FXMLLoader.load(getClass()%0A                    
 .get
@@ -399,17 +399,16 @@
 (%22/view/
-/
 MyScene.
@@ -428,369 +428,49 @@
     
-fxmlLoader.setControllerFactory(new Callback%3CClass%3C?%3E, Object%3E() %7B%0A            @Override%0A            public Object call(Class%3C?%3E requiredType) %7B%0A                return springContext.getBean(requiredType);%0A            %7D%0A        %7D);%0A        rootNode = (Parent) fxmlLoader.load();%0A    %7D%0A%0A    @Override%0A    public void start(Stage primaryStage) throws Exception %7B%0A%0A
+    primaryStage.setTitle(%22%E8%99%9A%E6%8B%9F%E6%A0%A1%E5%9B%AD%E7%99%BB%E9%99%86%22);%0A    
     
@@ -505,12 +505,8 @@
 root
-Node
 , 60
@@ -514,16 +514,20 @@
 , 400);%0A
+    
         
@@ -552,24 +552,28 @@
 ene(Scene);%0A
+    
         Scen
@@ -612,16 +612,20 @@
         
+    
 getClass
@@ -646,17 +646,16 @@
 (%22/view/
-/
 login.cs
@@ -658,16 +658,20 @@
 n.css%22)%0A
+    
         
@@ -706,32 +706,36 @@
 orm());%0A        
+    
 primaryStage.get
@@ -776,32 +776,36 @@
 png%22));%0A        
+    
 primaryStage.set
@@ -822,32 +822,36 @@
 false);%0A        
+ 
+   
 primaryStage.sho
@@ -863,24 +863,84 @@
     
-%7D%0A%0A    @Override
+    %7D catch(Exception e) %7B%0A            e.printStackTrace();%0A        %7D%0A    %7D%0A
 %0A   
@@ -951,47 +951,51 @@
 lic 
+static 
 void 
-stop() throws Exception
+main(String%5B%5D args)
  %7B%0A
+%0A
         
 spri
@@ -994,28 +994,20 @@
     
-springContext.close(
+launch( args
 );%0A 
@@ -1011,13 +1011,9 @@
 ;%0A    %7D%0A
-%0A%0A%0A%0A
 %7D

fix bugs