Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Spring安全性,ear中的主上下文根_Java_Spring_Spring Mvc_Spring Security_Spring Security Oauth2 - Fatal编程技术网

Java Spring安全性,ear中的主上下文根

Java Spring安全性,ear中的主上下文根,java,spring,spring-mvc,spring-security,spring-security-oauth2,Java,Spring,Spring Mvc,Spring Security,Spring Security Oauth2,嗨,我听过很多战争 EAR |_WAR1 context-root/ldap |_WAR2 context-root/primefaces ... 在WAR1中使用spring安全性我只能在context root/ldap中的context root/primefaces状态404中使用登录 我发现了许多解决方案,但在application.xml中,在我的项目中,spring是配置的,没有仅xml的注释。 试着使用,但不起作用 设置类似的上下文我不会只使用localhost:8080

嗨,我听过很多战争

EAR
 |_WAR1 context-root/ldap
 |_WAR2 context-root/primefaces
 ...
WAR1
中使用spring安全性我只能在
context root/ldap
中的
context root/primefaces
状态404中使用登录 我发现了许多解决方案,但在application.xml中,在我的项目中,spring是配置的,没有仅xml的注释。 试着使用,但不起作用

设置类似的上下文我不会只使用localhost:8080/上下文根,就像票证一样不再工作

                <modules>
                    <webModule>
                        <groupId>pl.luppo.war</groupId>
                        <artifactId>WarTest</artifactId>
                        <contextRoot>/context-root/primefaces</contextRoot>
                    </webModule>
                    <webModule>
                        <groupId>pl.jar.test</groupId>
                        <artifactId>WarSOAPTest</artifactId>
                        <contextRoot>/context-root/soap</contextRoot>
                    </webModule>
                    <webModule>
                        <groupId>pl.luppo.war.ldap</groupId>
                        <artifactId>WarLDAPOLD</artifactId>
                        <contextRoot>/context-root/ldap</contextRoot>
                    </webModule>
                </modules>
请尝试
“/context root”或“context root”
无操作

请帮助配置一些不带applicationContext.xml的单点登录,或设置一个主上下文根。 我搜索类似的问题,但每个解决方案都使用applicationContext.xml。我无法将xml解决方案更改为注释

整个项目(我知道我在WAR1和WAR2中有重复的*.xhtml,并且有很多评论LOC,因为我尝试了所有东西,但我不会删除它,因为我不会显示整个项目和我的尝试)
http://www.speedyshare.com/FtmW2/PomTest


感谢您的帮助

我使用Jboss SSO,但不起作用
 @Bean
 public SecurityContextPersistenceFilter
 securityContextPersistenceFilter() {
 HttpSessionSecurityContextRepository securityContextRepository = new
 HttpSessionSecurityContextRepository();
 securityContextRepository.setAllowSessionCreation(false);
 securityContextRepository.setSpringSecurityContextKey("/context-root/");