Commit 7d739dfaaea4b41f7c11a86b8ea6cef91fa59610
Committed by
Andrew Shvayka
1 parent
f81c688c
fix PsqlTsDao annotation & sql-ttl services
Showing
4 changed files
with
6 additions
and
3 deletions
... | ... | @@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Value; |
20 | 20 | import org.springframework.scheduling.annotation.Scheduled; |
21 | 21 | import org.springframework.stereotype.Service; |
22 | 22 | import org.thingsboard.server.dao.util.PsqlDao; |
23 | +import org.thingsboard.server.dao.util.SqlDao; | |
23 | 24 | import org.thingsboard.server.service.ttl.AbstractCleanUpService; |
24 | 25 | |
25 | 26 | import java.sql.Connection; |
... | ... | @@ -27,6 +28,7 @@ import java.sql.DriverManager; |
27 | 28 | import java.sql.SQLException; |
28 | 29 | |
29 | 30 | @PsqlDao |
31 | +@SqlDao | |
30 | 32 | @Slf4j |
31 | 33 | @Service |
32 | 34 | public class EventsCleanUpService extends AbstractCleanUpService { | ... | ... |
... | ... | @@ -18,14 +18,12 @@ package org.thingsboard.server.service.ttl.timeseries; |
18 | 18 | import lombok.extern.slf4j.Slf4j; |
19 | 19 | import org.springframework.beans.factory.annotation.Value; |
20 | 20 | import org.springframework.scheduling.annotation.Scheduled; |
21 | -import org.thingsboard.server.dao.util.PsqlTsAnyDao; | |
22 | 21 | import org.thingsboard.server.service.ttl.AbstractCleanUpService; |
23 | 22 | |
24 | 23 | import java.sql.Connection; |
25 | 24 | import java.sql.DriverManager; |
26 | 25 | import java.sql.SQLException; |
27 | 26 | |
28 | -@PsqlTsAnyDao | |
29 | 27 | @Slf4j |
30 | 28 | public abstract class AbstractTimeseriesCleanUpService extends AbstractCleanUpService { |
31 | 29 | ... | ... |
... | ... | @@ -17,5 +17,9 @@ package org.thingsboard.server.dao.util; |
17 | 17 | |
18 | 18 | import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; |
19 | 19 | |
20 | +import java.lang.annotation.Retention; | |
21 | +import java.lang.annotation.RetentionPolicy; | |
22 | + | |
23 | +@Retention(RetentionPolicy.RUNTIME) | |
20 | 24 | @ConditionalOnExpression("'${database.ts.type}'=='sql' && '${spring.jpa.database-platform}'=='org.hibernate.dialect.PostgreSQLDialect'") |
21 | 25 | public @interface PsqlTsDao { } |
\ No newline at end of file | ... | ... |