fix PsqlTsDao annotation & sql-ttl services
This commit is contained in:
parent
f81c688c3d
commit
7d739dfaae
@ -27,7 +27,6 @@ import java.sql.Statement;
|
|||||||
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@PsqlDao
|
|
||||||
public abstract class AbstractCleanUpService {
|
public abstract class AbstractCleanUpService {
|
||||||
|
|
||||||
@Value("${spring.datasource.url}")
|
@Value("${spring.datasource.url}")
|
||||||
|
|||||||
@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Value;
|
|||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.thingsboard.server.dao.util.PsqlDao;
|
import org.thingsboard.server.dao.util.PsqlDao;
|
||||||
|
import org.thingsboard.server.dao.util.SqlDao;
|
||||||
import org.thingsboard.server.service.ttl.AbstractCleanUpService;
|
import org.thingsboard.server.service.ttl.AbstractCleanUpService;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
@ -27,6 +28,7 @@ import java.sql.DriverManager;
|
|||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
|
||||||
@PsqlDao
|
@PsqlDao
|
||||||
|
@SqlDao
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
public class EventsCleanUpService extends AbstractCleanUpService {
|
public class EventsCleanUpService extends AbstractCleanUpService {
|
||||||
|
|||||||
@ -18,14 +18,12 @@ package org.thingsboard.server.service.ttl.timeseries;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.thingsboard.server.dao.util.PsqlTsAnyDao;
|
|
||||||
import org.thingsboard.server.service.ttl.AbstractCleanUpService;
|
import org.thingsboard.server.service.ttl.AbstractCleanUpService;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.DriverManager;
|
import java.sql.DriverManager;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
|
||||||
@PsqlTsAnyDao
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public abstract class AbstractTimeseriesCleanUpService extends AbstractCleanUpService {
|
public abstract class AbstractTimeseriesCleanUpService extends AbstractCleanUpService {
|
||||||
|
|
||||||
|
|||||||
@ -17,5 +17,9 @@ package org.thingsboard.server.dao.util;
|
|||||||
|
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
|
||||||
|
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@ConditionalOnExpression("'${database.ts.type}'=='sql' && '${spring.jpa.database-platform}'=='org.hibernate.dialect.PostgreSQLDialect'")
|
@ConditionalOnExpression("'${database.ts.type}'=='sql' && '${spring.jpa.database-platform}'=='org.hibernate.dialect.PostgreSQLDialect'")
|
||||||
public @interface PsqlTsDao { }
|
public @interface PsqlTsDao { }
|
||||||
Loading…
x
Reference in New Issue
Block a user