我担心在商业生产环境中使用GPL v2和GPL v3许可软件.我想使用HaProxy作为负载平衡解决方案.复制左边是否安全?我不会修改源代码中的任何内容,系统的体系结构需要使用负载均衡器.
它将嵌入更大的分布式系统中.所以我们卖的是整个系统.在另一个站点上,我们需要再次安装负载均衡器,并可能与其他东西混合使用.我认为这是"分配"一词让我感到困惑.
我希望我的回复包括:
"keyMaps":{
"href":"http://localhost/api/keyMaps{/keyMapId}",
"templated":true
}
Run Code Online (Sandbox Code Playgroud)
这很容易实现:
add(new Link("http://localhost/api/keyMaps{/keyMapId}", "keyMaps"));
Run Code Online (Sandbox Code Playgroud)
但是,当然,我宁愿使用ControllerLinkBuilder,如下所示:
add(linkTo(methodOn(KeyMapController.class).getKeyMap("{keyMapId}")).withRel("keyMaps"));
Run Code Online (Sandbox Code Playgroud)
问题是,当变量"{keyMapId}"到达UriTemplate构造函数时,它已被包含在编码的URL中:
http://localhost/api/keyMaps/%7BkeyMapId%7D
Run Code Online (Sandbox Code Playgroud)
因此UriTemplate的构造函数不会将其识别为包含变量.
我如何说服我想使用模板变量的ControllerLinkBuilder?
我在http://start.spring.io创建了一个应用程序,指定“Reactive Web”和“Security”。然后我构建并运行了该应用程序,没有出现任何问题。
然后我将spring-security-oauth2-autoconfigure依赖项添加到我的 pom 和@EnableResourceServer我的应用程序类中。javax.servlet.Filter我现在看到一个异常,因为即使我的应用程序不是基于 servlet 的,但仍在寻找某些内容。
这是我看到的例外:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfiguration': Post-processing of merged bean definition failed; nested exception is java.lang.TypeNotPresentException: Type javax.servlet.Filter not present
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:560) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:61) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:388) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at …Run Code Online (Sandbox Code Playgroud) java spring spring-boot spring-security-oauth2 spring-webflux