AI Risk Classification System: Day 8
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:
The controller component is resposible for handling incoming requests, which would be the requests from the React frontend in my application
ClassificationController.java
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
ClassificationResponse.java
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
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