2015-07-01 5 views
0

У меня проблема с apache сиро и весной mvc с угловыми.apache shiro и Spring mvc

Я получаю ошибку 404, когда я обращаюсь к странице углов, http://localhost:8080/app. Внутри папки приложения есть index.html, который должен быть началом приложения angularjs.

ниже является shiro.ini

# INI configuration is very powerful and flexible, while still remaining succinct. 
# Please http://shiro.apache.org/configuration.html and 
# http://shiro.apache.org/web.html for more. 

[main] 

authc.loginUrl = /login.html 
authc.usernameParam = username 
authc.passwordParam = password 
authc.rememberMeParam = rememberMe 
authc.successUrl = /app 


logout.redirectUrl = /logout.html 

# use in-memory caching to reduce the number of runtime lookups against the data source. 
cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager 
securityManager.cacheManager = $cacheManager 

# configure hashed password authentication 
credentialsMatcher = org.apache.shiro.authc.credential.Sha512CredentialsMatcher 
credentialsMatcher.storedCredentialsHexEncoded = false 
credentialsMatcher.hashIterations = 1 

# configure a realm to connect to the data source 
daRealm = com.example.security.myRealm 
daRealm.credentialsMatcher = $credentialsMatcher 
securityManager.realms = $myRealm 

[urls] 

/app/** = anon 

/favicon.ico = anon 
/css/home.css = anon 
/images/** = anon 
/= anon 
/index.html = anon 

/rest/** = anon 

/logout = logout 

/login.html = authc 

/** = authc 

ответ

0

Я думаю, вы должны использовать

authc.successUrl = /index.html 

Если есть каталог приложение под приложением, то

authc.successUrl = /app/index.html 

Кроме того, как ваш код я не знаю, что вы обеспечиваете, поскольку только один атрибут есть с authc

/app/** = anon 
/favicon.ico = anon 
/css/home.css = anon 
/images/** = anon 
/= anon 
/index.html = anon 
/rest/** = anon 
/logout = logout 
/login.html = authc 
Смежные вопросы