User preferences in Java EE applications

I have a growing web application that now needs to be able to store user and system preferences / settings In the past, I always launched my own web application preference system, but I want to know what others have done to solve this problem? Is there a library of preferences for web applications that people can recommend?

Ideally, user preferences should have a default value, which can then be overridden by the user Not all preferences should be made public to the user because some preferences will be used at the end of the dialog box

If I use roll my own routing, I think it will be a separate preference table. All preferences are stored as strings and converted to real original data types as needed For example, key, user_ key,setting_ name,setting_ A table like value I like this method to handle columns of each data type because it prevents the setting from ending unexpectedly with two values, and the users of the setting should know what data type they want

Solution

One method we use is:

>All non mandatory attributes have default values in the code > use the web application to provide the attribute file in which we define technology-oriented attributes > query the SQL table at application startup to load the main function oriented attributes

Attributes in the database have a higher priority than those in the included attribute file If your requirement is to prevent the feature manager from changing technical properties, you can add the context column to the property sheet checked in the management UI

All application code can see a globally used set of properties

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>