|
|
@ -24,8 +24,11 @@ import org.apache.ibatis.type.JdbcType; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.Properties; |
|
|
|
import java.util.Properties; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.sql.DataSource; |
|
|
|
import javax.sql.DataSource; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
|
|
|
import org.springframework.boot.jdbc.init.DataSourceScriptDatabaseInitializer; |
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
import org.springframework.core.io.support.PathMatchingResourcePatternResolver; |
|
|
|
import org.springframework.core.io.support.PathMatchingResourcePatternResolver; |
|
|
@ -41,6 +44,12 @@ import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean; |
|
|
|
@Configuration |
|
|
|
@Configuration |
|
|
|
public class SpringConnectionFactory { |
|
|
|
public class SpringConnectionFactory { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* Inject this field to make sure the database is initialized, this can solve the table not found issue #8432. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Autowired(required = false) |
|
|
|
|
|
|
|
public DataSourceScriptDatabaseInitializer dataSourceScriptDatabaseInitializer; |
|
|
|
|
|
|
|
|
|
|
|
@Bean |
|
|
|
@Bean |
|
|
|
public PaginationInterceptor paginationInterceptor() { |
|
|
|
public PaginationInterceptor paginationInterceptor() { |
|
|
|
return new PaginationInterceptor(); |
|
|
|
return new PaginationInterceptor(); |
|
|
|