-
Notifications
You must be signed in to change notification settings - Fork 96
Inizialize User and Categories
Damianofds edited this page Aug 6, 2012
·
1 revision
Geostore provide 2 xml files for specifiy the Categories and the Users used for the initialization. At startup, if there isn't any Categories or Users to load, Geostore search the files sample_categories.xml and sample_users.xml and save the data into DB.
the format of both two XML files is simple; see the examples below:
Categories:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CategoryList>
<Category>
<name>cat1</name>
</Category>
<Category>
<name>cat2</name>
</Category>
</CategoryList>
Users:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<InitUserList>
<User>
<name>admin</name>
<newPassword>admin</newPassword>
<role>ADMIN</role>
</User>
<User>
<name>user</name>
<newPassword>user</newPassword>
<role>USER</role>
</User>
</InitUserList>
Inside geostore-datasource-ovr.properties (module geostore-webapp) there are some properties for specify where geostore look for the initialization files. For each file you have to set the property geostoreInitializer.categoryListInitFile and geostoreInitializer.userListInitFile and there are 2 possibility, only one can be used:
- classpath:.xml if you want put your custom file in the classpath.
- file://<path/to/your/file> if you want to reference a file somewhere in the filesystem.
By default geostore search in the classpath.