less than 1 minute read

Introduction

Today, I worked on converting my Java backend program into a web service structure to later accept frontend calls from React

Development Notes

First, I created a new repository structure in order to use spring boot for a Controller-Model-Service structure:

Screenshot 2025-05-22 at 5 22 49 PM

The controller component is resposible for handling incoming requests, which would be the requests from the React frontend in my application

ClassificationController.java

Screenshot 2025-05-22 at 5 40 03 PM

For the model component, I created simple entities to build getters and setters to deal with my classifier’s data flow from the user and from classifer

ClassificationRequest.java

Screenshot 2025-05-22 at 5 45 45 PM

ClassificationResponse.java

Screenshot 2025-05-22 at 5 46 15 PM Screenshot 2025-05-22 at 5 46 28 PM

Finally, I built a service component mostly by mimicking the code structure of my original EUAIActClassifier.java file to perform the main operations of the classifier

ClassificationService.java

I then moved the original EUAIActClassifier.java file to a legacy folder so it doesn’t interfere with the Maven build. I also updated the pom.xml file to configure proper dependencies for spring boot