
com.aggrepoint.dao.spring.boot.DaoContextInitializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apdao Show documentation
Show all versions of apdao Show documentation
Data Access Object layer utilities
The newest version!
package com.aggrepoint.dao.spring.boot;
import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.io.DefaultResourceLoader;
import com.aggrepoint.service.ServiceClassLoader;
/**
* Enable ServiceClassLoader in Spring Boot application.
*
* @author jiangmingyang
*/
public class DaoContextInitializer implements ApplicationContextInitializer {
@Override
public void initialize(ConfigurableApplicationContext context) {
if (context instanceof DefaultResourceLoader) {
((DefaultResourceLoader) context).setClassLoader(new ServiceClassLoader(context.getClassLoader()));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy