mardi 14 juillet 2020

Advise on how to implement dynamic classes in java

Trying to implement logic where files sent by users can be processed(save data to db). The file is uploaded to server via POST api call. The format of the file is determined per user, by having users register into the system beforehand mentioning the format in JSON. If a user registers a format and then uploads file, the file format should be recognized and file data be processed. I attempted an approach to convert json to dynamic domain classes suggested by https://github.com/CSCONNECT/json2java A class is required as an ORM is used to persist to db.

Alternate approach is to manage DDL DML at code level instead of using ORM and use JDBC connection to persist, which is working fine as first approach doesn't scale.

Are there any approaches I am not considering? Is it possible to efficiently define domain classes without server restart?

This is a home project for learning.





Aucun commentaire:

Enregistrer un commentaire