Browse Source
Update imports for relocated Spring Boot 4 classes
pull/16341/head
Viacheslav Klimov
1 month ago
Failed to extract signature
32 changed files with
55 additions and
54 deletions
-
application/src/main/java/org/thingsboard/server/config/TbRuleEngineSecurityConfiguration.java
-
application/src/main/java/org/thingsboard/server/config/ThingsboardSecurityConfiguration.java
-
application/src/main/java/org/thingsboard/server/exception/ThingsboardErrorResponseHandler.java
-
application/src/main/java/org/thingsboard/server/service/iot_hub/IotHubRestClient.java
-
application/src/main/java/org/thingsboard/server/service/notification/channels/MicrosoftTeamsNotificationChannel.java
-
application/src/main/java/org/thingsboard/server/service/security/auth/oauth2/CustomOAuth2ClientMapper.java
-
application/src/main/java/org/thingsboard/server/service/security/auth/oauth2/GithubOAuth2ClientMapper.java
-
application/src/main/java/org/thingsboard/server/service/trendz/TrendzClient.java
-
common/dao-api/src/main/java/org/thingsboard/server/dao/util/TbAutoConfiguration.java
-
common/transport/http/src/main/java/org/thingsboard/server/transport/http/HttpTransportContext.java
-
common/transport/transport-api/src/main/java/org/thingsboard/server/common/transport/config/ssl/SslCredentialsWebServerCustomizer.java
-
common/transport/transport-api/src/test/java/org/thingsboard/server/common/transport/config/ssl/SslCredentialsWebServerCustomizerTest.java
-
dao/src/main/java/org/thingsboard/server/dao/config/DedicatedEventsJpaDaoConfig.java
-
dao/src/main/java/org/thingsboard/server/dao/config/JpaDaoConfig.java
-
edqs/src/test/java/org/thingsboard/server/edqs/repo/AbstractEDQTest.java
-
integration/apache-pulsar/src/main/resources/tb-apache-pulsar-integration.yml
-
integration/aws/src/main/resources/tb-aws-integration.yml
-
integration/azure/src/main/resources/tb-azure-integration.yml
-
integration/coap/src/main/resources/tb-coap-integration.yml
-
integration/http/src/main/resources/tb-http-integration.yml
-
integration/kafka/src/main/resources/tb-kafka-integration.yml
-
integration/mqtt/src/main/resources/tb-mqtt-integration.yml
-
integration/opc-ua/src/main/resources/tb-opc-ua-integration.yml
-
integration/pubsub/src/main/resources/tb-pubsub-integration.yml
-
integration/rabbitmq/src/main/resources/tb-rabbitmq-integration.yml
-
integration/tcp-udp/src/main/resources/tb-tcp-udp-integration.yml
-
integration/tuya/src/main/resources/tb-tuya-integration.yml
-
migrator/src/main/java/org/thingsboard/migrator/config/CassandraConfig.java
-
monitoring/src/main/java/org/thingsboard/monitoring/client/TbClient.java
-
monitoring/src/main/java/org/thingsboard/monitoring/notification/channels/impl/SlackNotificationChannel.java
-
monitoring/src/main/java/org/thingsboard/monitoring/service/integration/impl/HttpIntegrationHealthChecker.java
-
monitoring/src/main/java/org/thingsboard/monitoring/service/transport/impl/HttpTransportHealthChecker.java
|
|
|
@ -4,7 +4,7 @@ package org.thingsboard.server.config; |
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; |
|
|
|
import org.springframework.boot.autoconfigure.security.SecurityProperties; |
|
|
|
import org.springframework.boot.security.autoconfigure.web.servlet.SecurityFilterProperties; |
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
import org.springframework.core.annotation.Order; |
|
|
|
@ -17,7 +17,7 @@ import org.springframework.security.web.SecurityFilterChain; |
|
|
|
@Configuration |
|
|
|
@EnableWebSecurity |
|
|
|
@EnableMethodSecurity |
|
|
|
@Order(SecurityProperties.BASIC_AUTH_ORDER) |
|
|
|
@Order(SecurityFilterProperties.BASIC_AUTH_ORDER) |
|
|
|
@ConditionalOnExpression("'${service.type:null}'=='tb-rule-engine'") |
|
|
|
public class TbRuleEngineSecurityConfiguration { |
|
|
|
|
|
|
|
|
|
|
|
@ -7,7 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Qualifier; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; |
|
|
|
import org.springframework.boot.autoconfigure.security.SecurityProperties; |
|
|
|
import org.springframework.boot.security.autoconfigure.web.servlet.SecurityFilterProperties; |
|
|
|
import org.springframework.boot.web.servlet.FilterRegistrationBean; |
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
@ -61,7 +61,7 @@ import java.util.stream.Stream; |
|
|
|
@Configuration |
|
|
|
@EnableWebSecurity |
|
|
|
@EnableMethodSecurity |
|
|
|
@Order(SecurityProperties.BASIC_AUTH_ORDER) |
|
|
|
@Order(SecurityFilterProperties.BASIC_AUTH_ORDER) |
|
|
|
@TbCoreComponent |
|
|
|
public class ThingsboardSecurityConfiguration { |
|
|
|
|
|
|
|
|
|
|
|
@ -12,7 +12,7 @@ import jakarta.servlet.http.HttpServletResponse; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.exception.ExceptionUtils; |
|
|
|
import org.hibernate.exception.ConstraintViolationException; |
|
|
|
import org.springframework.boot.web.servlet.error.ErrorController; |
|
|
|
import org.springframework.boot.webmvc.error.ErrorController; |
|
|
|
import org.springframework.dao.DataAccessException; |
|
|
|
import org.springframework.http.HttpHeaders; |
|
|
|
import org.springframework.http.HttpStatus; |
|
|
|
|
|
|
|
@ -6,7 +6,7 @@ import com.fasterxml.jackson.databind.JsonNode; |
|
|
|
import jakarta.annotation.PostConstruct; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.boot.web.client.RestTemplateBuilder; |
|
|
|
import org.springframework.boot.restclient.RestTemplateBuilder; |
|
|
|
import org.springframework.http.HttpMethod; |
|
|
|
import org.springframework.http.HttpStatus; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
@ -10,7 +10,7 @@ import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.Setter; |
|
|
|
import org.apache.commons.codec.binary.Base64; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.boot.web.client.RestTemplateBuilder; |
|
|
|
import org.springframework.boot.restclient.RestTemplateBuilder; |
|
|
|
import org.springframework.http.HttpEntity; |
|
|
|
import org.springframework.http.HttpHeaders; |
|
|
|
import org.springframework.http.MediaType; |
|
|
|
|
|
|
|
@ -5,7 +5,7 @@ package org.thingsboard.server.service.security.auth.oauth2; |
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException; |
|
|
|
import jakarta.servlet.http.HttpServletRequest; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.boot.web.client.RestTemplateBuilder; |
|
|
|
import org.springframework.boot.restclient.RestTemplateBuilder; |
|
|
|
import org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.web.client.RestTemplate; |
|
|
|
|
|
|
|
@ -7,7 +7,7 @@ import lombok.Data; |
|
|
|
import lombok.ToString; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.boot.web.client.RestTemplateBuilder; |
|
|
|
import org.springframework.boot.restclient.RestTemplateBuilder; |
|
|
|
import org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.web.client.RestTemplate; |
|
|
|
|
|
|
|
@ -7,7 +7,7 @@ import jakarta.annotation.PostConstruct; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.boot.web.client.RestTemplateBuilder; |
|
|
|
import org.springframework.boot.restclient.RestTemplateBuilder; |
|
|
|
import org.springframework.core.ParameterizedTypeReference; |
|
|
|
import org.springframework.http.HttpEntity; |
|
|
|
import org.springframework.http.HttpHeaders; |
|
|
|
|
|
|
|
@ -3,14 +3,15 @@ |
|
|
|
package org.thingsboard.server.dao.util; |
|
|
|
|
|
|
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; |
|
|
|
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration; |
|
|
|
import org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration; |
|
|
|
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; |
|
|
|
|
|
|
|
import java.lang.annotation.Retention; |
|
|
|
import java.lang.annotation.RetentionPolicy; |
|
|
|
|
|
|
|
@Retention(RetentionPolicy.RUNTIME) |
|
|
|
@EnableAutoConfiguration(exclude = {CassandraAutoConfiguration.class, CassandraDataAutoConfiguration.class, RedisAutoConfiguration.class}) |
|
|
|
@EnableAutoConfiguration(excludeName = { |
|
|
|
"org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration", |
|
|
|
"org.springframework.boot.data.cassandra.autoconfigure.DataCassandraAutoConfiguration", |
|
|
|
"org.springframework.boot.data.redis.autoconfigure.DataRedisAutoConfiguration" |
|
|
|
}) |
|
|
|
public @interface TbAutoConfiguration { |
|
|
|
} |
|
|
|
|
|
|
|
@ -8,7 +8,7 @@ import org.apache.coyote.ProtocolHandler; |
|
|
|
import org.apache.coyote.http11.Http11NioProtocol; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; |
|
|
|
import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer; |
|
|
|
import org.springframework.boot.tomcat.TomcatConnectorCustomizer; |
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.thingsboard.server.common.transport.TransportContext; |
|
|
|
|
|
|
|
@ -7,7 +7,7 @@ import org.springframework.beans.factory.SmartInitializingSingleton; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Qualifier; |
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; |
|
|
|
import org.springframework.boot.autoconfigure.web.ServerProperties; |
|
|
|
import org.springframework.boot.web.server.autoconfigure.ServerProperties; |
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
|
|
|
import org.springframework.boot.ssl.NoSuchSslBundleException; |
|
|
|
import org.springframework.boot.ssl.SslBundle; |
|
|
|
@ -15,7 +15,7 @@ import org.springframework.boot.ssl.SslBundles; |
|
|
|
import org.springframework.boot.ssl.SslStoreBundle; |
|
|
|
import org.springframework.boot.web.server.Ssl; |
|
|
|
import org.springframework.boot.web.server.WebServerFactoryCustomizer; |
|
|
|
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory; |
|
|
|
import org.springframework.boot.web.server.servlet.ConfigurableServletWebServerFactory; |
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
|
|
|
|
@ -10,7 +10,7 @@ import org.mockito.Mock; |
|
|
|
import org.mockito.junit.jupiter.MockitoExtension; |
|
|
|
import org.mockito.junit.jupiter.MockitoSettings; |
|
|
|
import org.mockito.quality.Strictness; |
|
|
|
import org.springframework.boot.autoconfigure.web.ServerProperties; |
|
|
|
import org.springframework.boot.web.server.autoconfigure.ServerProperties; |
|
|
|
import org.springframework.boot.ssl.SslBundle; |
|
|
|
import org.springframework.boot.ssl.SslBundles; |
|
|
|
import org.springframework.test.util.ReflectionTestUtils; |
|
|
|
|
|
|
|
@ -5,9 +5,9 @@ package org.thingsboard.server.dao.config; |
|
|
|
|
|
|
|
import com.zaxxer.hikari.HikariDataSource; |
|
|
|
import org.springframework.beans.factory.annotation.Qualifier; |
|
|
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; |
|
|
|
import org.springframework.boot.jdbc.autoconfigure.DataSourceProperties; |
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
|
|
|
import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder; |
|
|
|
import org.springframework.boot.jpa.EntityManagerFactoryBuilder; |
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
import org.springframework.data.jpa.repository.config.EnableJpaRepositories; |
|
|
|
|
|
|
|
@ -6,9 +6,9 @@ package org.thingsboard.server.dao.config; |
|
|
|
import com.zaxxer.hikari.HikariDataSource; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Qualifier; |
|
|
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; |
|
|
|
import org.springframework.boot.jdbc.autoconfigure.DataSourceProperties; |
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
|
|
|
import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder; |
|
|
|
import org.springframework.boot.jpa.EntityManagerFactoryBuilder; |
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
import org.springframework.context.annotation.ComponentScan; |
|
|
|
import org.springframework.context.annotation.ComponentScan.Filter; |
|
|
|
|
|
|
|
@ -7,7 +7,7 @@ import org.junit.After; |
|
|
|
import org.junit.Before; |
|
|
|
import org.junit.runner.RunWith; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.boot.autoconfigure.domain.EntityScan; |
|
|
|
import org.springframework.boot.persistence.autoconfigure.EntityScan; |
|
|
|
import org.springframework.test.context.bean.override.mockito.MockitoBean; |
|
|
|
import org.springframework.context.annotation.ComponentScan; |
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
|
|
|
|
@ -25,8 +25,8 @@ integration: |
|
|
|
spring: |
|
|
|
autoconfigure: |
|
|
|
exclude: |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisRepositoriesAutoConfiguration |
|
|
|
|
|
|
|
storage: |
|
|
|
# Location of the folder to store data files |
|
|
|
|
|
|
|
@ -23,8 +23,8 @@ integration: |
|
|
|
spring: |
|
|
|
autoconfigure: |
|
|
|
exclude: |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisRepositoriesAutoConfiguration |
|
|
|
|
|
|
|
storage: |
|
|
|
data_folder_path: "${INTEGRATION_STORAGE_DATA_FOLDER_PATH:./}" |
|
|
|
|
|
|
|
@ -23,8 +23,8 @@ integration: |
|
|
|
spring: |
|
|
|
autoconfigure: |
|
|
|
exclude: |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisRepositoriesAutoConfiguration |
|
|
|
|
|
|
|
storage: |
|
|
|
data_folder_path: "${INTEGRATION_STORAGE_DATA_FOLDER_PATH:./}" |
|
|
|
|
|
|
|
@ -25,8 +25,8 @@ integration: |
|
|
|
spring: |
|
|
|
autoconfigure: |
|
|
|
exclude: |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisRepositoriesAutoConfiguration |
|
|
|
|
|
|
|
storage: |
|
|
|
# Location of the folder to store data files |
|
|
|
|
|
|
|
@ -31,8 +31,8 @@ spring.mvc.async.request-timeout: "${SPRING_MVC_ASYNC_REQUEST_TIMEOUT:30000}" |
|
|
|
spring: |
|
|
|
autoconfigure: |
|
|
|
exclude: |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisRepositoriesAutoConfiguration |
|
|
|
|
|
|
|
storage: |
|
|
|
# Location of the folder to store data files |
|
|
|
|
|
|
|
@ -25,8 +25,8 @@ integration: |
|
|
|
spring: |
|
|
|
autoconfigure: |
|
|
|
exclude: |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisRepositoriesAutoConfiguration |
|
|
|
|
|
|
|
storage: |
|
|
|
# Location of the folder to store data files |
|
|
|
|
|
|
|
@ -23,8 +23,8 @@ integration: |
|
|
|
spring: |
|
|
|
autoconfigure: |
|
|
|
exclude: |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisRepositoriesAutoConfiguration |
|
|
|
|
|
|
|
storage: |
|
|
|
data_folder_path: "${INTEGRATION_STORAGE_DATA_FOLDER_PATH:./}" |
|
|
|
|
|
|
|
@ -23,8 +23,8 @@ integration: |
|
|
|
spring: |
|
|
|
autoconfigure: |
|
|
|
exclude: |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisRepositoriesAutoConfiguration |
|
|
|
|
|
|
|
storage: |
|
|
|
data_folder_path: "${INTEGRATION_STORAGE_DATA_FOLDER_PATH:./}" |
|
|
|
|
|
|
|
@ -25,8 +25,8 @@ integration: |
|
|
|
spring: |
|
|
|
autoconfigure: |
|
|
|
exclude: |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisRepositoriesAutoConfiguration |
|
|
|
|
|
|
|
storage: |
|
|
|
# Location of the folder to store data files |
|
|
|
|
|
|
|
@ -25,8 +25,8 @@ integration: |
|
|
|
spring: |
|
|
|
autoconfigure: |
|
|
|
exclude: |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisRepositoriesAutoConfiguration |
|
|
|
|
|
|
|
storage: |
|
|
|
# Location of the folder to store data files |
|
|
|
|
|
|
|
@ -23,8 +23,8 @@ integration: |
|
|
|
spring: |
|
|
|
autoconfigure: |
|
|
|
exclude: |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisRepositoriesAutoConfiguration |
|
|
|
|
|
|
|
storage: |
|
|
|
data_folder_path: "${INTEGRATION_STORAGE_DATA_FOLDER_PATH:./}" |
|
|
|
|
|
|
|
@ -25,8 +25,8 @@ integration: |
|
|
|
spring: |
|
|
|
autoconfigure: |
|
|
|
exclude: |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration |
|
|
|
- org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisAutoConfiguration |
|
|
|
- org.springframework.boot.data.redis.autoconfigure.DataRedisRepositoriesAutoConfiguration |
|
|
|
|
|
|
|
storage: |
|
|
|
# Location of the folder to store data files |
|
|
|
|
|
|
|
@ -3,16 +3,16 @@ |
|
|
|
package org.thingsboard.migrator.config; |
|
|
|
|
|
|
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; |
|
|
|
import org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration; |
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; |
|
|
|
import org.springframework.boot.autoconfigure.data.cassandra.CassandraDataAutoConfiguration; |
|
|
|
import org.springframework.boot.cassandra.autoconfigure.CassandraAutoConfiguration; |
|
|
|
import org.springframework.boot.data.cassandra.autoconfigure.DataCassandraAutoConfiguration; |
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
|
|
|
|
/** |
|
|
|
* Disables Cassandra autoconfiguration if Cassandra export/import is disabled |
|
|
|
* */ |
|
|
|
@Configuration |
|
|
|
@EnableAutoConfiguration(exclude = {CassandraDataAutoConfiguration.class, CassandraAutoConfiguration.class}) |
|
|
|
@EnableAutoConfiguration(exclude = {DataCassandraAutoConfiguration.class, CassandraAutoConfiguration.class}) |
|
|
|
@ConditionalOnExpression("('${mode}' == 'TENANT_DATA_EXPORT' && ${export.cassandra.enabled} == false) || ('${mode}' == 'TENANT_DATA_IMPORT' and ${import.cassandra.enabled} == false) || ('${mode}' == 'CASSANDRA_LATEST_KV_EXPORT')") |
|
|
|
public class CassandraConfig { |
|
|
|
} |
|
|
|
|
|
|
|
@ -4,7 +4,7 @@ package org.thingsboard.monitoring.client; |
|
|
|
|
|
|
|
import jakarta.annotation.PostConstruct; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.boot.web.client.RestTemplateBuilder; |
|
|
|
import org.springframework.boot.restclient.RestTemplateBuilder; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.thingsboard.rest.client.RestClient; |
|
|
|
|
|
|
|
|
|
|
|
@ -7,7 +7,7 @@ import jakarta.annotation.PreDestroy; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
|
|
|
import org.springframework.boot.web.client.RestTemplateBuilder; |
|
|
|
import org.springframework.boot.restclient.RestTemplateBuilder; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.web.client.RestTemplate; |
|
|
|
import org.thingsboard.monitoring.data.notification.Notification; |
|
|
|
|
|
|
|
@ -4,7 +4,7 @@ package org.thingsboard.monitoring.service.integration.impl; |
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.config.ConfigurableBeanFactory; |
|
|
|
import org.springframework.boot.web.client.RestTemplateBuilder; |
|
|
|
import org.springframework.boot.restclient.RestTemplateBuilder; |
|
|
|
import org.springframework.context.annotation.Scope; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.web.client.RestTemplate; |
|
|
|
|
|
|
|
@ -4,7 +4,7 @@ package org.thingsboard.monitoring.service.transport.impl; |
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.config.ConfigurableBeanFactory; |
|
|
|
import org.springframework.boot.web.client.RestTemplateBuilder; |
|
|
|
import org.springframework.boot.restclient.RestTemplateBuilder; |
|
|
|
import org.springframework.context.annotation.Scope; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.web.client.RestTemplate; |
|
|
|
|