Modeshape 初始内容创建
Modeshape initial content creation
我尝试将初始内容添加到我的存储库中。但是在日志中我可以看到:
10:12:46.934 DEBUG o.m.jcr.InitialContentImporter - Importing node at path /{}accounts
10:12:46.941 DEBUG o.m.jcr.InitialContentImporter - Importing node at path /{}users
10:12:46.941 DEBUG o.m.jcr.InitialContentImporter - Importing node at path /{}accounts/{}foo
为什么添加 {} ?原因(我猜)我没有在我的回购中初始化任何东西
我的 modeshape 配置和 xml 初始内容文件如下所示
json 文件:
{
"name": "cloud-repository-dev",
"workspaces": {
"predefined": ["otherWorkspace"],
"default": "default",
"allowCreation": true,
"initialContent": {
"otherWorkspace": "conf/initialContent/init.xml"
}
},
"security": {
"anonymous": {
"roles": [
"readonly",
"readwrite",
"admin"
],
"useOnFailedLogin": false
}
},
"storage": {
"cacheConfiguration": "conf/infinispan-configuration-dev.xml",
"cacheName": "persisted_repository",
"binaryStorage": {
"type": "file",
"directory": "binaries",
"minimumBinarySizeInBytes": 999
}
},
"node-types": ["conf/cnd/cloud.cnd"]
}
xml 文件
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0">
<accounts>
<account1 jcr:name="foo" email="cwontact@bar.com"/>
</accounts>
<users></users>
</jcr:root>
ModeShape 或您的内容没有任何问题。
ModeShape 有时会通过将名称空间 URI 括在大括号中来打印出节点名称或路径。因此,在您的情况下,{}
表示节点名称使用 "blank" 命名空间,如导入 XML 文件中所指定:
<accounts>
<account1 jcr:name="foo" email="cwontact@bar.com"/>
</accounts>
<users></users>
如果您使用 JCR API 查看您的内容,您会发现大括号实际上并未出现在节点名称中。
我尝试将初始内容添加到我的存储库中。但是在日志中我可以看到:
10:12:46.934 DEBUG o.m.jcr.InitialContentImporter - Importing node at path /{}accounts
10:12:46.941 DEBUG o.m.jcr.InitialContentImporter - Importing node at path /{}users
10:12:46.941 DEBUG o.m.jcr.InitialContentImporter - Importing node at path /{}accounts/{}foo
为什么添加 {} ?原因(我猜)我没有在我的回购中初始化任何东西
我的 modeshape 配置和 xml 初始内容文件如下所示
json 文件:
{
"name": "cloud-repository-dev",
"workspaces": {
"predefined": ["otherWorkspace"],
"default": "default",
"allowCreation": true,
"initialContent": {
"otherWorkspace": "conf/initialContent/init.xml"
}
},
"security": {
"anonymous": {
"roles": [
"readonly",
"readwrite",
"admin"
],
"useOnFailedLogin": false
}
},
"storage": {
"cacheConfiguration": "conf/infinispan-configuration-dev.xml",
"cacheName": "persisted_repository",
"binaryStorage": {
"type": "file",
"directory": "binaries",
"minimumBinarySizeInBytes": 999
}
},
"node-types": ["conf/cnd/cloud.cnd"]
}
xml 文件
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0">
<accounts>
<account1 jcr:name="foo" email="cwontact@bar.com"/>
</accounts>
<users></users>
</jcr:root>
ModeShape 或您的内容没有任何问题。
ModeShape 有时会通过将名称空间 URI 括在大括号中来打印出节点名称或路径。因此,在您的情况下,{}
表示节点名称使用 "blank" 命名空间,如导入 XML 文件中所指定:
<accounts>
<account1 jcr:name="foo" email="cwontact@bar.com"/>
</accounts>
<users></users>
如果您使用 JCR API 查看您的内容,您会发现大括号实际上并未出现在节点名称中。