A Spring Boot application that parses country-to-HQ and contact data from .txt files and preloads lookup and superhero tables.
- Java JDK 17 or later (tested with Java 21)
- Maven (for dependency management)
- IntelliJ IDEA Community Edition (for running the project)
AvengersParser/
├── pom.xml
├── README.md
├── data/ //Input data
│ ├── country_hq.txt
│ └── contacts/
│ ├── Aircraft-Headquarter.txt
│ └── ...
└── src/
└── main/
├── java/
│ └── com/avengers/avengers_fe/
│ ├── AvengersFeApplication.java
│ ├── controller/
│ │ └── DashboardController.java
│ ├── model/
│ │ ├── CountryHQ.java
│ │ └── ContactTable.java
│ ├── service/
│ │ └── DataLoaderService.java
│ └── utils/
│ └── Utils.java
└── resources/
├── application.properties
└── templates/
│ ├── index.html
│ ├── lookup.html
└── superhero.html
-
Import the Project:
- Open IntelliJ IDEA Community Edition.
- Click File > Open... and select the
pom.xmlfile in the project root. IntelliJ will import the project as a Maven project.
-
Build the Project:
- IntelliJ should automatically download the required dependencies.
- You can build the project by clicking Build > Build Project.
-
Run the Application:
- Locate the main class:
AvengersFeApplication.java(undercom.avengers.avengers_fe). - Right-click on the file and select Run 'AvengersFeApplication'.
- The application will start on port 8080.
- Locate the main class:
-
Access the Endpoints:
- Open your browser and navigate to:
- http://localhost:8080/ for the home page.
- http://localhost:8080/lookup for the lookup dashboard.
- http://localhost:8080/superhero for the superhero dashboard.
- Open your browser and navigate to:
- Configuration:
The Thymeleaf templates are located insrc/main/resources/templates. The view resolver is configured inapplication.properties.