Resolve RED-6686 "2"
This commit is contained in:
parent
79b70f75d6
commit
e763750efa
@ -17,7 +17,7 @@
|
|||||||
<bucket4j.version>6.4.1</bucket4j.version>
|
<bucket4j.version>6.4.1</bucket4j.version>
|
||||||
<bucket4j.spring.version>0.4.0</bucket4j.spring.version>
|
<bucket4j.spring.version>0.4.0</bucket4j.spring.version>
|
||||||
<swagger-commons.version>0.5.0</swagger-commons.version>
|
<swagger-commons.version>0.5.0</swagger-commons.version>
|
||||||
<keycloak-commons.version>0.14.0</keycloak-commons.version>
|
<keycloak-commons.version>0.18.0</keycloak-commons.version>
|
||||||
<jobs-commons.version>0.6.0</jobs-commons.version>
|
<jobs-commons.version>0.6.0</jobs-commons.version>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@ -0,0 +1,41 @@
|
|||||||
|
package com.iqser.red.service.persistence.management.v1.processor.cache;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.core.env.Environment;
|
||||||
|
import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
|
||||||
|
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
|
||||||
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class RedisConfiguration {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
RedisStandaloneConfiguration redisStandaloneConfiguration(Environment environment) {
|
||||||
|
|
||||||
|
var configuration = new RedisStandaloneConfiguration();
|
||||||
|
configuration.setHostName(environment.getProperty("REDIS_HOST", "localhost"));
|
||||||
|
configuration.setPort(environment.getProperty("REDIS_PORT", Integer.class, 6379));
|
||||||
|
configuration.setPassword(environment.getProperty("REDIS_PASSWORD"));
|
||||||
|
configuration.setUsername(environment.getProperty("REDIS_USERNAME"));
|
||||||
|
|
||||||
|
return configuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
LettuceConnectionFactory lettuceConnectionFactory(RedisStandaloneConfiguration redisStandaloneConfiguration) {
|
||||||
|
|
||||||
|
return new LettuceConnectionFactory(redisStandaloneConfiguration);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public RedisTemplate<String, Object> redisTemplate(RedisStandaloneConfiguration redisStandaloneConfiguration) {
|
||||||
|
|
||||||
|
RedisTemplate<String, Object> template = new RedisTemplate<>();
|
||||||
|
template.setConnectionFactory(lettuceConnectionFactory(redisStandaloneConfiguration));
|
||||||
|
return template;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -31,13 +31,7 @@ spring:
|
|||||||
mvc:
|
mvc:
|
||||||
pathmatch:
|
pathmatch:
|
||||||
matching-strategy: ant-path-matcher
|
matching-strategy: ant-path-matcher
|
||||||
redis:
|
|
||||||
host: ${REDIS_HOST:localhost}
|
|
||||||
port: ${REDIS_PORT:6379}
|
|
||||||
password: ${REDIS_PASSWORD:}
|
|
||||||
|
|
||||||
profiles:
|
|
||||||
active: kubernetes
|
|
||||||
rabbitmq:
|
rabbitmq:
|
||||||
host: ${RABBITMQ_HOST:localhost}
|
host: ${RABBITMQ_HOST:localhost}
|
||||||
port: ${RABBITMQ_PORT:5672}
|
port: ${RABBITMQ_PORT:5672}
|
||||||
@ -54,11 +48,6 @@ spring:
|
|||||||
prefetch: 1
|
prefetch: 1
|
||||||
application:
|
application:
|
||||||
name: persistence-service
|
name: persistence-service
|
||||||
data:
|
|
||||||
redis:
|
|
||||||
host: ${REDIS_HOST:localhost}
|
|
||||||
port: ${REDIS_PORT:6379}
|
|
||||||
password: ${REDIS_PASSWORD:}
|
|
||||||
|
|
||||||
management:
|
management:
|
||||||
endpoint:
|
endpoint:
|
||||||
@ -109,19 +98,20 @@ bucket4j:
|
|||||||
unit: seconds
|
unit: seconds
|
||||||
|
|
||||||
|
|
||||||
springdoc.packages-to-scan: [ 'com.iqser.red.persistence.service.v1.external.api' ]
|
|
||||||
|
|
||||||
fforesight:
|
fforesight:
|
||||||
keycloak:
|
keycloak:
|
||||||
ignored-endpoints: [ '/redaction-gateway-v1','/actuator/health/**', '/redaction-gateway-v1/async/download/with-ott/**',
|
ignored-endpoints: [ '/redaction-gateway-v1','/actuator/health/**', '/redaction-gateway-v1/async/download/with-ott/**',
|
||||||
'/internal-api/**',
|
'/internal-api/**', '/redaction-gateway-v1/docs/swagger-ui',
|
||||||
'/redaction-gateway-v1/docs/**','/redaction-gateway-v1/docs','/redaction-gateway-v1/tenants/simple' ]
|
'/redaction-gateway-v1/docs/**','/redaction-gateway-v1/docs', ]
|
||||||
enabled: true
|
enabled: true
|
||||||
springdoc:
|
springdoc:
|
||||||
base-path: '/redaction-gateway-v1'
|
base-path: '/redaction-gateway-v1'
|
||||||
auth-server-url: ${keycloak.auth-server-url}
|
auth-server-url: ${keycloak.auth-server-url}
|
||||||
enabled: true
|
enabled: true
|
||||||
default-client-id: 'swagger-ui-client'
|
default-client-id: 'swagger-ui-client'
|
||||||
|
packages-to-scan: [ 'com.iqser.red.persistence.service.v1.external.api' ]
|
||||||
|
default-tenant: 'redaction'
|
||||||
tenant-exchange:
|
tenant-exchange:
|
||||||
name: 'tenants-exchange'
|
name: 'tenants-exchange'
|
||||||
user-exchange:
|
user-exchange:
|
||||||
@ -137,3 +127,16 @@ fforesight:
|
|||||||
tenants:
|
tenants:
|
||||||
remote: true
|
remote: true
|
||||||
|
|
||||||
|
springdoc:
|
||||||
|
swagger-ui:
|
||||||
|
path: ${fforesight.springdoc.base-path}/docs/swagger-ui
|
||||||
|
operations-sorter: alpha
|
||||||
|
tags-sorter: alpha
|
||||||
|
oauth:
|
||||||
|
client-id: swagger-ui-client
|
||||||
|
doc-expansion: none
|
||||||
|
config-url: ${fforesight.springdoc.base-path}/docs/swagger-config
|
||||||
|
api-docs:
|
||||||
|
path: ${fforesight.springdoc.base-path}/docs?tenantId=${fforesight.springdoc.default-tenant}
|
||||||
|
enabled: ${fforesight.springdoc.enabled}
|
||||||
|
pre-loading-enabled: true
|
||||||
|
|||||||
@ -417,10 +417,8 @@ public abstract class AbstractPersistenceServerServiceTest {
|
|||||||
|
|
||||||
log.info("Hosts are - Redis: {}, Postgres: {}", redisContainer.getHost(), postgreSQLContainerMaster.getHost());
|
log.info("Hosts are - Redis: {}, Postgres: {}", redisContainer.getHost(), postgreSQLContainerMaster.getHost());
|
||||||
|
|
||||||
TestPropertyValues.of("spring.redis.port=" + redisContainer.getFirstMappedPort(),
|
TestPropertyValues.of("REDIS_PORT=" + redisContainer.getFirstMappedPort(),
|
||||||
"spring.redis.host=" + redisContainer.getHost(),
|
"REDIS_HOST=" + redisContainer.getHost(),
|
||||||
"spring.data.redis.port=" + redisContainer.getFirstMappedPort(),
|
|
||||||
"spring.data.redis.host=" + redisContainer.getHost(),
|
|
||||||
"fforesight.jobs.enabled=false",
|
"fforesight.jobs.enabled=false",
|
||||||
"fforesight.keycloak.enabled=false").applyTo(configurableApplicationContext.getEnvironment());
|
"fforesight.keycloak.enabled=false").applyTo(configurableApplicationContext.getEnvironment());
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user