spring-attic / http

Apache License 2.0
7 stars 12 forks source link

GH-3: Make HTTP Source SI-based, add ConfigProps #4

Closed artembilan closed 7 years ago

artembilan commented 7 years ago

Fixes spring-cloud-stream-app-starters/http#3 spring-cloud-stream-app-starters/http#1

Since we can't use @ConfigurationProperties with the @RequestMapping, plus right now there is no way to pass inbound headers, rework the source to use Spring Integration HTTP Inbound Channel Adapter

artembilan commented 7 years ago

Note: I wasn't able to modify README for new configuration properties because the spring-cloud-app-starter-doc-maven-plugin doesn't work for me properly on Windows.

I have this debug on the matter:

[DEBUG] Resolved classpath location [/META-INF/spring-configuration-metadata-whitelist.properties] to resources [URL [jar:file:/D:/SpringIO/spring-cloud-stream-app-starters/http/spring-cloud-starter-stream-source-http/target/spring-cloud-starter-stream-source-http-1.2.0.BUILD-SNAPSHOT.jar!/META-INF/spring-configuration-metadata-whitelist.properties], URL [file:/D:/SpringIO/spring-cloud-stream-app-starters/http/spring-cloud-starter-stream-source-http/target/classes/META-INF/spring-configuration-metadata-whitelist.properties]]
[DEBUG] Resolved classpath location [/META-INF/spring-configuration-metadata.json] to resources [URL [jar:file:/D:/SpringIO/spring-cloud-stream-app-starters/http/spring-cloud-starter-stream-source-http/target/spring-cloud-starter-stream-source-http-1.2.0.BUILD-SNAPSHOT.jar!/META-INF/spring-configuration-metadata.json], URL [file:/D:/SpringIO/spring-cloud-stream-app-starters/http/spring-cloud-starter-stream-source-http/target/classes/META-INF/spring-configuration-metadata.json], URL [jar:file:/C:/Users/abilan/.m2/repository/org/springframework/cloud/spring-cloud-stream/1.2.0.BUILD-SNAPSHOT/spring-cloud-stream-1.2.0.BUILD-SNAPSHOT.jar!/META-INF/spring-configuration-metadata.json], URL [jar:file:/C:/Users/abilan/.m2/repository/org/springframework/boot/spring-boot-actuator/1.5.0.RC1/spring-boot-actuator-1.5.0.RC1.jar!/META-INF/spring-configuration-metadata.json], URL [jar:file:/C:/Users/abilan/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/1.5.0.RC1/spring-boot-autoconfigure-1.5.0.RC1.jar!/META-INF/spring-configuration-metadata.json], URL [jar:file:/C:/Users/abilan/.m2/repository/org/springframework/boot/spring-boot/1.5.0.RC1/spring-boot-1.5.0.RC1.jar!/META-INF/spring-configuration-metadata.json]]
[DEBUG] Documenting http.mapped-request-headers
[DEBUG] Documenting http.path-pattern
[DEBUG] Documenting server.port
[INFO] Documented 3 configuration properties

But nothing has written to the README back.

Or I am missing something else, or spring-cloud-app-starter-doc-maven-plugin doesn't work on Windows.

Thanks

/CC @ericbottard

markpollack commented 7 years ago

Oops, I ended up merging this as I didn't see the comments. It doesn't seem that there was a conclusion to the above discussion...

Regenerated the app to update the README.adoc with new config props.

I tested posting to /data and was also able to access the /management/env endpoint.

Let's open a new issue for feature enhancements.

squashed and merged as d38cfb1ca7141529ed24324a9459c5682739e6bf