Skip to content

Is there something in spring-boot-1.4 which might resolve URL beans? #6813

@malkusch

Description

@malkusch

I know spring boot is a huge umbrella and chances are very low that it's actually spring related, but maybe this might ring a bell for someone:

I upgraded from spring-boot-starter-parent-1.3.7 to 1.4.0 and noticed a huge difference in startup time. Strace showed me that the application is busy in resolving hostnames. I do have a spring managed bean which does have somewhere inside a huge graph of URL objects. And it happens that exactly these URLs are now resolved during the startup phase.

This log excerpt might indicate in which phase the resolving is happening:

2016-09-02 23:36:23.506 INFO 4382 --- [ost-startStop-1] o.s.web.context.ContextLoader: Root WebApplicationContext: initialization completed in 2783 ms
2016-09-02 23:36:23.785 INFO 4382 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2016-09-02 23:36:23.789 INFO 4382 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'metricFilter' to: [/]
2016-09-02 23:36:23.789 INFO 4382 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/
]
2016-09-02 23:36:23.789 INFO 4382 ---[ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/]
2016-09-02 23:36:23.790 INFO 4382 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/
]
2016-09-02 23:36:23.790 INFO 4382 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/]
2016-09-02 23:36:23.790 INFO 4382 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'webRequestLoggingFilter' to: [/
]
2016-09-02 23:36:24.505 INFO 4382 --- [ main] d.d.a.i.d.w.WSLSelectWhoisServerService : Updating whois server list
2016-09-02 23:36:25.059 INFO 4382 --- [ main] d.d.a.i.d.w.WSLSelectWhoisServerService : updated
2016-09-02 23:39:47.559 INFO 4382 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService
2016-09-02 23:39:47.575 INFO 4382 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'eventbus'
2016-09-02 23:39:47.928 INFO 4382 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice:

The WSLSelectWhoisServerService is the bean which contains those URL objects. The log message "updated" comes from the last line of its constructor. The URL objects are part of an object graph which was unmarshalled using JAXB (within said constructor). So there are also JAXB annotations sprinkled within that managed bean. I don't know if Spring reacts on them.

So could it be that with Spring-Boot-1.4 something was introduced which might resolve hostnames of URL objects within a managed bean (containing JAXB annotations)? If yes, how could I turn that off?

Meanwhile I try to provide a SSCCE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions