java - When using dozer in Springboot, how to avoid dozer looking for its agreed configuration file dozer.properties every time the application is started?
ringa_lee
ringa_lee 2017-06-12 09:22:38
0
1
2088

Just like the title. Dozer mapper was added to my project, gradle dependency: compile("net.sf.dozer:dozer:5.4.0"), I did not set the dozer.properties file, but directly configured one javabean, the code is as follows:

@Configuration
public class DozerConfig {

    @Bean
    public DozerBeanMapperFactoryBean mapper() {
        return new DozerBeanMapperFactoryBean();
    }
}

, and then the question is: every time I start this application, dozer will search for the dozer.properties file, which takes about half a minute. Is there any way for me to remove this search process through configuration? Startup log related content:

2017-06-06 20:57:49.908 [restartedMain] INFO  o.s.b.c.e.ServletRegistrationBean -  Mapping servlet: 'dispatcherServlet' to [/]
2017-06-06 20:58:14.274 [restartedMain] INFO  org.dozer.config.GlobalSettings -  Trying to find Dozer configuration file: dozer.properties
2017-06-06 20:58:14.281 [restartedMain] WARN  org.dozer.config.GlobalSettings -  Dozer configuration file not found: dozer.properties.  Using defaults for all Dozer global properties.
2017-06-06 20:58:14.283 [restartedMain] INFO  org.dozer.DozerInitializer -  Initializing Dozer. Version: 5.4.0, Thread Name: restartedMain
ringa_lee
ringa_lee

ringa_lee

reply all(1)
过去多啦不再A梦

Dozer’s configuration file cannot be omitted, the object-relational mapping must be defined in the xml file. If you are in the project integration stage, you may consider using mapstruct.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!