Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Java CI

on:
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '25'
distribution: 'temurin'

- name: Build with Maven
run: mvn clean test
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package com.project.authapi.system_log_analyzer;

import com.project.authapi.system_log_analyzer.controller.WelcomeViewFXController;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class SystemLogAnalyzerApp extends Application {

private ConfigurableApplicationContext springContext;
Expand All @@ -21,9 +20,9 @@ public void init() {

@Override
public void start(Stage primaryStage) throws Exception {
FXMLLoader loader = new FXMLLoader(getClass().getResource("/WelcomeView.fxml"));
FXMLLoader loader = new FXMLLoader(getClass().getResource("/view/WelcomeView.fxml"));
loader.setControllerFactory(springContext::getBean);
loader.setController(springContext.getBean(com.project.authapi.system_log_analyzer.controller.LogAnalyzerFXController.class));
loader.setController(springContext.getBean(WelcomeViewFXController.class));
Parent root = loader.load();

Scene scene = new Scene(root);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ protected List<LogEvent> call() throws Exception {

var springContext = com.project.authapi.system_log_analyzer.config.ApplicationContextProvider.getApplicationContext();

FXMLLoader loader = new FXMLLoader(getClass().getResource("/MainWindow.fxml"));
FXMLLoader loader = new FXMLLoader(getClass().getResource("/view/MainWindow.fxml"));
loader.setControllerFactory(springContext::getBean);
Parent root = loader.load();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.io.IOException;

@Component
public class LogAnalyzerFXController {
public class WelcomeViewFXController {
@FXML private Button scanButton;
@FXML private TextField logFilesDirField;
@FXML private TextField reportDirField;
Expand Down Expand Up @@ -55,7 +55,7 @@ private void scan(ActionEvent event) throws IOException {

ApplicationContext springContext = ApplicationContextProvider.getApplicationContext();

FXMLLoader loader = new FXMLLoader(getClass().getResource("/LoadingScreen.fxml"));
FXMLLoader loader = new FXMLLoader(getClass().getResource("/view/LoadingScreen.fxml"));
loader.setControllerFactory(springContext::getBean); // <-- magiczna linia
Parent root = loader.load();

Expand Down