Search in sources :

Example 1 with DateTimeType

use of com.querydsl.sql.types.DateTimeType in project querydsl by querydsl.

the class JdbcConfiguration method querydslConfiguration.

@Bean
public com.querydsl.sql.Configuration querydslConfiguration() {
    SQLTemplates templates = H2Templates.builder().build();
    com.querydsl.sql.Configuration configuration = new com.querydsl.sql.Configuration(templates);
    configuration.setExceptionTranslator(new SpringExceptionTranslator());
    configuration.register(new DateTimeType());
    configuration.register(new LocalDateType());
    return configuration;
}
Also used : DateTimeType(com.querydsl.sql.types.DateTimeType) SpringExceptionTranslator(com.querydsl.sql.spring.SpringExceptionTranslator) Configuration(org.springframework.context.annotation.Configuration) LocalDateType(com.querydsl.sql.types.LocalDateType) SQLTemplates(com.querydsl.sql.SQLTemplates) Bean(org.springframework.context.annotation.Bean)

Aggregations

SQLTemplates (com.querydsl.sql.SQLTemplates)1 SpringExceptionTranslator (com.querydsl.sql.spring.SpringExceptionTranslator)1 DateTimeType (com.querydsl.sql.types.DateTimeType)1 LocalDateType (com.querydsl.sql.types.LocalDateType)1 Bean (org.springframework.context.annotation.Bean)1 Configuration (org.springframework.context.annotation.Configuration)1