Spring Cloud Data Flow HTTP源应用程序抛出ObjectPostProcessor必需的错误

时间:2018-08-26 11:32:38

标签: spring-cloud-stream spring-cloud-dataflow

我正在尝试部署一个简单的http流应用程序,但部署失败,并显示以下消息:

Description:

A component required a bean of type 'org.springframework.security.config.annotation.ObjectPostProcessor' that could not be found.


Action:

Consider defining a bean of type 'org.springframework.security.config.annotation.ObjectPostProcessor' in your configuration.

我用于shell的命令:

stream create --name pmmlTest --definition "http --server.port=8083 | pmml --modelLocation=https://raw.githubusercontent.com/spring-cloud/spring-cloud-stream-modules/master/pmml-processor/src/test/resources/iris-flower-classification-naive-bayes-1.pmml.xml --inputs='Sepal.Length=payload.sepalLength,Sepal.Width=payload.sepalWidth,Petal.Length=payload.petalLength,Petal.Width=payload.petalWidth' --outputs='Predicted_Species=payload.predictedSpecies' --inputType='application/x-spring-tuple' --outputType='application/json'| log" --deploy

SCDF版本1.6.1.GA;部署的应用程序:maven://org.springframework.cloud.stream.app:http‑source‑kafka:2.0.1.RELEASE

完整日志:

2018-08-26 16:49:42.662  INFO 19160 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@28f67ac7: startup date [Sun Aug 26 16:49:42 IST 2018]; root of context hierarchy
2018-08-26 16:49:43.986  INFO 19160 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$198077d3] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.3.RELEASE)

2018-08-26 16:49:46.021  INFO 19160 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://localhost:8888
2018-08-26 16:49:47.388  INFO 19160 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Connect Timeout Exception on Url - http://localhost:8888. Will be trying the next url if available
2018-08-26 16:49:47.388  WARN 19160 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/http-source/default": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect
2018-08-26 16:49:47.394  INFO 19160 --- [           main] s.c.s.a.h.s.k.HttpSourceKafkaApplication : No active profile set, falling back to default profiles: default
2018-08-26 16:49:47.434  INFO 19160 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@5025a98f: startup date [Sun Aug 26 16:49:47 IST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@28f67ac7
2018-08-26 16:49:52.340  INFO 19160 --- [           main] o.s.i.config.IntegrationRegistrar        : No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
2018-08-26 16:49:58.952  INFO 19160 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=60f7b4ed-c0e2-31da-9379-6e49a356e6ef
2018-08-26 16:49:59.016  INFO 19160 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
2018-08-26 16:49:59.039  INFO 19160 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.
2018-08-26 16:49:59.625  INFO 19160 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.kafka.annotation.KafkaBootstrapConfiguration' of type [org.springframework.kafka.annotation.KafkaBootstrapConfiguration$$EnhancerBySpringCGLIB$$d1188659] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-08-26 16:49:59.899  INFO 19160 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.integration.config.IntegrationManagementConfiguration' of type [org.springframework.integration.config.IntegrationManagementConfiguration$$EnhancerBySpringCGLIB$$68583005] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-08-26 16:50:00.023  INFO 19160 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$198077d3] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-08-26 16:50:00.187  INFO 19160 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.integration.dsl.context.IntegrationFlowContext' of type [org.springframework.integration.dsl.context.IntegrationFlowContext] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-08-26 16:50:04.826  INFO 19160 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8083 (http)
2018-08-26 16:50:04.960  INFO 19160 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2018-08-26 16:50:04.961  INFO 19160 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.31
2018-08-26 16:50:05.418  INFO 19160 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jre1.8.0_162\bin;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;C:\Program Files\Docker\Docker\Resources\bin;C:\ProgramData\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;D:\Program Files\Java\jdk1.8.0_141\bin;D:\scdf\zookeeper-3.4.10\bin;D:\Program Files\TortoiseGit\bin;D:\Program Files\Git\cmd;D:\Program Files\Git\mingw64\bin;D:\Program Files\Git\usr\bin;D:\Backup\Softwares\apache-maven-3.5.3\bin;D:\ProgramData\Anaconda3;C:\Users\sanket_karjagi\AppData\Local\Microsoft\WindowsApps;;.]
2018-08-26 16:50:08.448  INFO 19160 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2018-08-26 16:50:08.448  INFO 19160 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 21014 ms
2018-08-26 16:50:26.150  INFO 19160 --- [ost-startStop-1] o.s.s.c.ThreadPoolTaskScheduler          : Initializing ExecutorService  'taskScheduler'
2018-08-26 16:50:28.396  INFO 19160 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped to [/]
2018-08-26 16:50:28.458  INFO 19160 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-08-26 16:50:28.459  INFO 19160 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2018-08-26 16:50:28.459  INFO 19160 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2018-08-26 16:50:28.460  INFO 19160 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2018-08-26 16:50:28.460  INFO 19160 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpTraceFilter' to: [/*]
2018-08-26 16:50:28.461  INFO 19160 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'webMvcMetricsFilter' to: [/*]
2018-08-26 16:50:28.985  WARN 19160 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.stream.app.http.source.HttpSourceConfiguration$HttpSourceSecurityConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.security.config.annotation.ObjectPostProcessor<?>' available
2018-08-26 16:50:28.990  INFO 19160 --- [           main] o.s.s.c.ThreadPoolTaskScheduler          : Shutting down ExecutorService 'taskScheduler'
2018-08-26 16:50:28.999  INFO 19160 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2018-08-26 16:50:29.207  INFO 19160 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-08-26 16:50:32.266 ERROR 19160 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

A component required a bean of type 'org.springframework.security.config.annotation.ObjectPostProcessor' that could not be found.


Action:

Consider defining a bean of type 'org.springframework.security.config.annotation.ObjectPostProcessor' in your configuration.

1 个答案:

答案 0 :(得分:0)

我们正在通过spring-cloud-stream-app-starters#19跟踪与Spring Boot的默认安全行为更改有关的异常。

在我们发布新版本的应用程序之前,您可以通过使用以下部署属性部署流来禁用安全配置:

  

流部署.... --properties app.http.spring.autoconfigure.exclude =