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

5th
Jul 2018
Jay Yann
@GreedyPirate
Jul 05 2018 03:06
hi,can someone help me with this issue?
spring-cloud/spring-cloud-netflix#3057
fintech-ninja
@fintech-ninja
Jul 05 2018 10:11
Hi Experts, I have a spring boot client app which needs to load config from cloud config server(Https with username password). I managed to get it working with https without basic auth somehow by extending WebSecurityConfigurerAdapter. Now i need to pass the username/password credentials. Read few articles and implemented customConfigServicePropertySourceLocator. But the thing is, when i mention this class in META-INF/spring.factories it will reload entire bootstrap from this class. What I need is just to add username/password without touching other bootstrap parameters. Any inputs?
Fabricio
@ofabricio
Jul 05 2018 11:22

I'm setting zuul ctx.setSendZuulResponse(false) in a "route" filter (order -1) but i get a "post" filter executing. Any idea?
i want to return a custom response in this route filter

        val ctx = getCurrentContext();
        ctx.setSendZuulResponse(false);
        ctx.setResponseBody(mapper.writeValueAsString(legacyError));
        ctx.addZuulResponseHeader(CONTENT_TYPE, APPLICATION_JSON_UTF8_VALUE);
        ctx.setResponseStatusCode(OK.value());

but it goes to another filter and mess everthing

Marcos Barbero
@marcosbarbero
Jul 05 2018 12:44
@fintech-ninja why you have this class in spring.factories?
are you building an auto-config lib?
Nastya Smirnova
@Aloren
Jul 05 2018 16:34
@ofabricio try
        ctx.setResponseStatusCode(httpCode);
        ctx.setResponseBody(body);
        ctx.addZuulResponseHeader("Content-Type", MediaType.APPLICATION_JSON_VALUE);
        ctx.setSendZuulResponse(false);
        //Disable SimpleHostRoutingFilter
        ctx.setRouteHost(null);
        //Disable RibbonRoutingFilter
        ctx.remove("serviceId");
KaijuDeluxe
@KaijuDeluxe
Jul 05 2018 17:14

Hi, i have property which is onetoOne but in the manufacturer table its inserted per every product. For example

public class Product implements Serializable {
    @OneToOne(cascade = { CascadeType.ALL })
    private Manufacturer manufa;
}

so i have the same manufacturer 1000 of times in the table, but i only should have it once and every product should reference to it

language the same
image.png
Spencer Gibb
@spencergibb
Jul 05 2018 17:23
@KaijuDeluxe not really a spring cloud question
KaijuDeluxe
@KaijuDeluxe
Jul 05 2018 17:25
thx