Apache Shiro и Spring MVC

0

Я сталкиваюсь с проблемой с apache сиро и весной mvc с angularjs.

Я получаю ошибку 404, когда я обращаюсь к странице angularjs, 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
Теги:
spring
spring-mvc
shiro

1 ответ

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

Ещё вопросы

Сообщество Overcoder
Наверх
Меню