【问题标题】:Is it possible to run Spring Security from vaading4spring together with Vaadin Spring Boot?是否可以从 vaading4spring 与 Vaadin Spring Boot 一起运行 Spring Security?
【发布时间】:2015-06-15 06:44:20
【问题描述】:

是否可以将 vaading4spring 中的 Spring Security 与 Vaadin Spring Boot 一起运行?

当我在 build.gradle 混合两者时

// Official VaadinSpring Integration
compile("com.vaadin:vaadin-spring:1.0.0.beta2")
compile("com.vaadin:vaadin-spring-boot:1.0.0.beta2")
compile("com.vaadin:vaadin-spring-boot-starter:1.0.0.beta2")

// Supporting (unofficial) vaadin4spring 
compile("org.vaadin.spring:spring-vaadin:0.0.5.RELEASE")
compile("org.vaadin.spring:spring-boot-vaadin:0.0.5.RELEASE")
compile("org.vaadin.spring:spring-vaadin-security:0.0.5.RELEASE")

新注解(如@SpringUI)不起作用。

当我删除时

compile("org.vaadin.spring:spring-vaadin:0.0.5.RELEASE")
compile("org.vaadin.spring:spring-boot-vaadin:0.0.5.RELEASE")

来自 build.gradle,

我有一个例外说

原因:org.springframework.beans.factory.NoSuchBeanDefinitionException:没有为依赖项找到类型为 [org.vaadin.spring.http.HttpService] 的合格 bean:预计至少有 1 个 bean 有资格作为此依赖项的自动装配候选者。依赖注解:{@org.springframework.beans.factory.annotation.Autowired(required=true)} 在 org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1301) 在 org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1047) 在 org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942) 在 org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533) ... 77 更多

感谢您的帮助。

【问题讨论】:

    标签: spring-security vaadin vaadin4spring


    【解决方案1】:

    vaadin4spring 0.0.5 是最后一个独立版本,您应该这样使用它(不要混用!)。下一个版本的 vaadin4spring 将建立在官方 spring vaadin 插件的基础上,但这项工作正在进行中(有关此的详细信息在这里:https://github.com/peholmst/vaadin4spring/issues/164

    对于您的具体问题,请参阅https://github.com/peholmst/vaadin4spring/issues/206

    有关 spring 安全示例,请参见 vaadin4spring:

    https://github.com/peholmst/vaadin4spring/tree/v0.0.5/samples/security-sample

    【讨论】:

    • 感谢您的回复。
    猜你喜欢
    • 2020-04-10
    • 2020-10-29
    • 1970-01-01
    • 2011-07-25
    • 2015-05-27
    • 1970-01-01
    • 2021-05-27
    • 2011-11-30
    • 2013-01-13
    相关资源
    最近更新 更多