-
Notifications
You must be signed in to change notification settings - Fork 40
Error running a Spring Integration using spring boot/groovy dsl #6
Comments
The Please open a JIRA Issue. |
I commented out the bean and was able to run the application. However i am still not able to hit the path which i specified in my int-http-gateway. I see that the path /examples/eventsFlow is mapped properly. Sending the snippet from the log When i try 2 hit the endpoint i am redirected to whitelabel error page. This is what the error page says.. |
Can you show your I am curious as to how you are getting the DSL generated beans into boot's root context. |
I was able to kludge it to get it to work. The mapping you saw was happening in the DSL's context and so not available to the Boot app. I had to declare a dummy adapter at the boot level in order to get the path mapping in the root context. With Spring Integration 4.0, we now have I also had to "promote" the endpoint up to the root context so it's available to boot as an endpoint. Like I said; a bit of a kluge; but it works; here is a Gist with my code. |
I was able to run the example.Thanks for that.I am however facing some more issues. My use case is that i listen for requests on my http inbound gateway, parse the request, and call an http outbound gateway taking that data . I need to send the data back 2 the user. Sending u the snippet which i was working on . I added an explicit declaration for http outbound gateway as the httpGet (mentioned in docs) was not getting recognized. I want to know how i can pass control from the inbound gateway to the outbound gateway. When i wired it this way shown below, the flow doesnot register anything. I also wanted to use spel for which i wanted to created a uri-variable. The dsl probably was not able to register and gave an errror.
|
This (including SpEL url construction) works for me...
...but not from a browser (Chrome) because google gzips the content. It works fine from
You would need to change the |
I have a question here. I am trying to access spring configuration file using junit, but it is failing before setUp() method with following errror: |
here is my Junit:
|
and servlet-config code im trying to access/load is :
|
I have created a Spring Boot project where i included Spring Integration starter/Spring Integration dsl groovy/dsl-groovy http.
This is the snippet from my build.gradle
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
apply plugin: 'groovy'
apply plugin: 'war'
apply plugin: 'jetty'
apply plugin: 'application'
mainClassName = 'hello.Application'
war {
baseName = 'gs-integration'
version = '0.1.0'
}
repositories {
mavenCentral()
maven { url "http://repo.spring.io/libs-snapshot" }
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-web:1.0.0.RC5') {
exclude group:'org.springframework.boot', module:'spring-boot-starter-tomcat'
}
compile 'org.springframework.boot:spring-boot-starter-actuator:1.0.0.RC5'
compile 'org.springframework.boot:spring-boot-starter-jetty:1.0.0.RC5'
compile 'org.springframework:spring-context-support:4.0.0.M3'
compile("org.codehaus.groovy:groovy-all:2.1.6")
compile("org.springframework.boot:spring-boot-starter-integration")
compile("org.springframework.integration:spring-integration-dsl-groovy-core:1.0.0.M1")
{
exclude group:'org.springframework.integration', module:'spring-integration-http'
}
compile("org.springframework.integration:spring-integration-dsl-groovy-http:1.0.0.M1")
testCompile("junit:junit-dep:4.8.2")
}
When i do gradle clean run, i am getting a stacktrace
Caused by: java.lang.ClassNotFoundException: org.springframework.integration.http.inbound.UriPathHandlerMapping
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:236)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:392)
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1348)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1319)
... 94 more
This is my dsl which i have used
doWithSpringIntegration {
namespaces('int-http')
springXml {
bean(id:'uriPathHandlerMapping','class':'org.springframework.integration.http.inbound.UriPathHandlerMapping')
// httpGet(responseType:String,requestChannel:'events-request-inbound-channel')
}
}
The text was updated successfully, but these errors were encountered: