Java 如何使用系统用户导入内容?
我有以下项目结构:Java 如何使用系统用户导入内容?,java,aem,sling,Java,Aem,Sling,我有以下项目结构: content.xml文件内容看起来是这样的: <?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" jcr:mixinTypes="[rep:AccessControllable]" jcr:primaryType="rep:system"> <rep:pr
content.xml
文件内容看起来是这样的:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal"
jcr:mixinTypes="[rep:AccessControllable]"
jcr:primaryType="rep:system">
<rep:privileges/>
<jcr:versionStorage/>
<rep:permissionStore jcr:primaryType="rep:PermissionStore">
<crx.default jcr:primaryType="rep:PermissionStore">
<trololo1 jcr:primaryType="rep:PermissionStore">
<_x002d_2124328162
jcr:primaryType="rep:PermissionStore"
rep:accessControlledPath="/system">
<_x0032_
jcr:primaryType="rep:Permissions"
rep:isAllow="{Boolean}true"
rep:privileges="{Long}[2105343]"/>
</_x002d_2124328162>
<_x0031_259237738
jcr:primaryType="rep:PermissionStore"
rep:accessControlledPath="/content">
<_x0031_8
jcr:primaryType="rep:Permissions"
rep:isAllow="{Boolean}true"
rep:privileges="{Long}[2105343]"/>
</_x0031_259237738>
<_x0031_500933
jcr:primaryType="rep:PermissionStore"
rep:accessControlledPath="/etc">
<_x0034_
jcr:primaryType="rep:Permissions"
rep:isAllow="{Boolean}true"
rep:privileges="{Long}[2105343]"/>
</_x0031_500933>
<_x0031_515144
jcr:primaryType="rep:PermissionStore"
rep:accessControlledPath="/tmp">
<_x0032_
jcr:primaryType="rep:Permissions"
rep:isAllow="{Boolean}true"
rep:privileges="{Long}[2105343]"/>
</_x0031_515144>
<_x0031_516696
jcr:primaryType="rep:PermissionStore"
rep:accessControlledPath="/var">
<_x0033_
jcr:primaryType="rep:Permissions"
rep:isAllow="{Boolean}true"
rep:privileges="{Long}[2105343]"/>
</_x0031_516696>
<_x0034_6406433
jcr:primaryType="rep:PermissionStore"
rep:accessControlledPath="/apps">
<_x0035_
jcr:primaryType="rep:Permissions"
rep:isAllow="{Boolean}true"
rep:privileges="{Long}[2105343]"/>
</_x0034_6406433>
<_x0034_6464979
jcr:primaryType="rep:PermissionStore"
rep:accessControlledPath="/conf">
<_x0032_
jcr:primaryType="rep:Permissions"
rep:isAllow="{Boolean}true"
rep:privileges="{Long}[2105343]"/>
</_x0034_6464979>
<_x0034_6613902
jcr:primaryType="rep:PermissionStore"
rep:accessControlledPath="/home">
<_x0038_
jcr:primaryType="rep:Permissions"
rep:isAllow="{Boolean}true"
rep:privileges="{Long}[2105343]"/>
</_x0034_6613902>
<_x0034_6726973
jcr:primaryType="rep:PermissionStore"
rep:accessControlledPath="/libs">
<_x0034_
jcr:primaryType="rep:Permissions"
rep:isAllow="{Boolean}true"
rep:privileges="{Long}[2105343]"/>
</_x0034_6726973>
</trololo1>
</crx.default>
</rep:permissionStore>
<rep:policy/>
<jcr:activities/>
<jcr:nodeTypes/>
<rep:namespaces/>
</jcr:root>
是否可以从内容部署系统用户
附笔。
从6.0迁移到6.1后出现问题
我需要添加具有广泛权限的新系统用户,并将其写入Apache Sling服务用户映射器服务Apache Sling服务用户映射器
configuration而不是admin,以避免slingRepository.loginService
org.apache.jackrabbit.vault.packaging.PackageException: javax.jcr.nodetype.ConstraintViolationException: Item is protected.