You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
clean-parking/src/main/java/egovframework/config/MyBatisConfig.java

27 lines
924 B
Java

package egovframework.config;
import org.mybatis.spring.boot.autoconfigure.ConfigurationCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
/**
* MyBatis Configuration
*
* This class configures MyBatis by adding custom interceptors.
*/
@Configuration
@Profile({"local", "dev"}) // local과 dev 프로파일에서만 활성화
public class MyBatisConfig {
/**
* Customizes the MyBatis configuration by adding the query interceptor.
*
* @param interceptor The MyBatis query interceptor
* @return A ConfigurationCustomizer that adds the interceptor to MyBatis
*/
@Bean
public ConfigurationCustomizer mybatisConfigurationCustomizer(MyBatisQueryInterceptor interceptor) {
return configuration -> configuration.addInterceptor(interceptor);
}
}