Reputation: 198398
I have a very simple web project, which need to just persistence some "users", each one just have a few fields("username", "password").
Now I persistent them into a database, but I think it's too heavy.
I wonder if there are some easy ways to persistent them without a database. It's great just need to save pojos directly.
UPDATE
To save them in a file directly(like serialization, properties file) is easy, but not easy with CRUD. That means, when I get a specified user, I have to load them, then check the username one by one. When I update or delete one, I need to load all and save all.
I hope something like db4o, but with a good licence(not GPL nor commercial). The performance is not important here.
Upvotes: 1
Views: 1916
Reputation: 602
Using Properties file is another solution, http://download.oracle.com/javase/tutorial/essential/environment/properties.html But note that you're storing passwords, you might need to encrypt them
Upvotes: 0