我正在尝试配置Security + Vaadin4Spring和我的Vaadin 7应用程序。
我有以下代码:
与pom.xml安全相关的依赖关系:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<version>1.1.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.vaadin.spring</groupId>
<artifactId>spring-vaadin-security</artifactId>
<version>0.0.3-SNAPSHOT</version>
</dependency>我的MainUI类定义:
@VaadinUI
public class MainUI extends UI {和Application类
@PropertySource(value = "classpath:application.properties")
@EnableAutoConfiguration
@ComponentScan
@EnableGlobalMethodSecurity
public class Application extends GlobalMethodSecurityConfiguration {
public static void main(String[] args) throws Exception {
SpringApplication.run(Application.class, args);
}
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth
.inMemoryAuthentication()
.withUser("user").password("password").roles("USER")
.and()
.withUser("admin").password("password").roles("ADMIN");
}
}现在,当我试图访问http://localhost:8080/时,我收到以下错误消息:
HTTP ERROR 404
Problem accessing /error. Reason:Request was not handled by any registered handler.Powered by Jetty://我做错什么了?请帮帮我,我在没有Spring安全的第二天被困在这个问题上,我的应用程序工作得很好,但是没有安全性,它就没有什么意义了。谢谢!
发布于 2014-09-26 23:48:06
在vaadin4spring github:https://github.com/peholmst/vaadin4spring/issues/78上解决
https://stackoverflow.com/questions/25952514
复制相似问题