These are chat archives for spring-cloud/spring-cloud

27th
Sep 2016
Prakash Seela
@prakashseela
Sep 27 2016 10:55
Hi Guys,
I have a question, i given spring boot and spring cloud depedency manegement like below
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Brixton.SR5</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
But, while build/maven update project in eclipse, refering spring-boot-dependencies-1.3.5.RELEASE instead of spring-boot-dependencies-1.4.0.RELEASE,please advise how to resolve this issue.
we don't have spring-boot-dependencies-1.3.5.RELEASE artifacts in our maven repository.
Dave Syer
@dsyer
Sep 27 2016 11:04
You can't stop it wanting to download that.
But it won't be used at runtime
I.e. you need 1.3.5 to be accessible.
Even if you switch to Camden.RELEASE (which you should consider anyway), it will be the same
Also, please don't use the "starter-parent" as a BOM. Use the "-dependencies".
Prakash Seela
@prakashseela
Sep 27 2016 11:09
so..it mean 1.3.5 should there in our own maven repo..other wise build won't success right
and even can't override the version
Dave Syer
@dsyer
Sep 27 2016 11:11
Correct
Prakash Seela
@prakashseela
Sep 27 2016 11:12
Thank you..Dave Syer
pradeepkusingh
@pradeepkusingh
Sep 27 2016 14:19
@dsyer : One qq.. In Cloud foundry we notice that our apps keep getting restarted and hit config servers --> github and put load on Github. How can I ask config server to look locally copy of proeprties files and bring apps then I can refresh it later using endpoints ?
Spencer Gibb
@spencergibb
Sep 27 2016 14:20
there isn’t an automatic mode that works as you describe
pradeepkusingh
@pradeepkusingh
Sep 27 2016 14:21
ok. I think an enhancement request should be good ?
let me know if you think it is worth to put a request in github for this feature ?
Spencer Gibb
@spencergibb
Sep 27 2016 14:22
@checketts runs with the git repos checked out locally (file:// vs http://) and then uses an external process to update them
I think so, there may be an open issue already
pradeepkusingh
@pradeepkusingh
Sep 27 2016 14:24
ok, Thanks Spencer :)
bitsofinfo
@bitsofinfo
Sep 27 2016 19:33
Hi all, I am currently on Brixton.SR6, if I want to move to Camden.RELEASE, is there any major migration guide I should be reading? I am using discovery, config, stream.
bitsofinfo
@bitsofinfo
Sep 27 2016 20:51
so the method I was using to register a custom message converter seems to have broken w/ camden. I don't see anything about this in the release notes.

This was working with brixton.sr6, looks like things changed to MessageConverter based solution, I changed it

used to work:

    @Bean
    @ConditionalOnMissingBean
    public List<AbstractFromMessageConverter> myEventMessageConverters() {

        ObjectMapper mapper = new ObjectMapper();
        SimpleModule module = new SimpleModule();
        module.setAbstractTypes(new SimpleAbstractTypeResolver()
                .addMapping(MyInterface.class, MyImpl.class));
        mapper.registerModule(module);

        ArrayList<AbstractFromMessageConverter> mine = new ArrayList<AbstractFromMessageConverter>();
        mine.add(new JsonToPojoMessageConverter(mapper));
        return mine;
    }

for camden I adjusted to this:

@Bean
    @ConditionalOnMissingBean
    public List<MessageConverter> myEventMessageConverters() {

        ObjectMapper mapper = new ObjectMapper();
        SimpleModule module = new SimpleModule();
        module.setAbstractTypes(new SimpleAbstractTypeResolver()
                .addMapping(MyInterface.class, MyImpl.class));
        mapper.registerModule(module);

        ArrayList<MessageConverter> mine = new ArrayList<MessageConverter>();
        mine.add(new CustomizableJsonUnmarshallingConverter(mapper));
        return mine;
    }

    private class CustomizableJsonUnmarshallingConverter extends JsonUnmarshallingConverter {
        protected CustomizableJsonUnmarshallingConverter(ObjectMapper objectMapper) {
            super(objectMapper);
        }

    }
but the latter doesn't seem to get picked up anymore
Dave Syer
@dsyer
Sep 27 2016 21:01
Calling @mbg (he's probably travelling)
Dave Syer
@dsyer
Sep 27 2016 21:12
Why do you create a list?
I think you should create a single instance
bitsofinfo
@bitsofinfo
Sep 27 2016 21:13
because of this
I mean this previously worked fine, the arch looks the same, but looks like some of the typing changed to the core spring messaging interfaces
despite, its like that is not even being consulted:
        at org.springframework.messaging.converter.MappingJackson2MessageConverter.convertFromInternal(MappingJackson2MessageConverter.java:224)
        at org.springframework.messaging.converter.AbstractMessageConverter.fromMessage(AbstractMessageConverter.java:175)
        at org.springframework.messaging.converter.CompositeMessageConverter.fromMessage(CompositeMessageConverter.java:67)
        at org.springframework.messaging.handler.annotation.support.PayloadArgumentResolver.resolveArgument(PayloadArgumentResolver.java:117)
        at org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:112)
        at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:138)
        at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:107)
        at org.springframework.cloud.stream.binding.StreamListenerAnnotationBeanPostProcessor$StreamListenerMessageHandler.handleRequestMessage(StreamListenerAnnotationBeanPostProcessor.java:307)
        at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:109)
        at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127)
bitsofinfo
@bitsofinfo
Sep 27 2016 21:28
@dsyer ok, so yes declaring my converter as a standalone bean works. Anyways just noting the prior List based way used to work. I don't really care, just not sure if worthy of an issue report