Skip to content

Improve datasource#14

Merged
schernysh merged 5 commits intomasterfrom
improve-datasource
Oct 31, 2018
Merged

Improve datasource#14
schernysh merged 5 commits intomasterfrom
improve-datasource

Conversation

@TerentievEvgany
Copy link
Copy Markdown
Contributor

No description provided.

@AllArgsConstructor
@Configuration
@EnableConfigurationProperties
@ConditionalOnProperty(prefix = "spring.aerospike", name = {"endpoint"}, havingValue = "true")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need for a new endpoint property since there is a couple of other required properties that could be used instead, for example host, same for redis

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for now in application.yml we have properties for both.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aerospike and redis

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it is something that has to change. It's only in local profile so either aerospike or redis configuration could be left and another removed.

import java.util.List;
import java.util.Objects;

@Repository("aerospike")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need for qualifier I think

Comment thread README.md Outdated
cache.profiles.active: aerospike
cache.aerospike.classname.canonical: org.prebid.cache.repository.aerospike.AerospikeRepositoryImpl
cache.aerospike.property.configuration.classname: AerospikePropertyConfiguration
spring.aerospike.endpoint: true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is obsolete now

Comment thread README.md Outdated
cache.profiles.active: redis
cache.redis.classname.canonical: org.prebid.cache.repository.redis.RedisRepositoryImpl
cache.redis.property.configuration.classname: RedisPropertyConfiguration
spring.aerospike.endpoint: false
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is obsolete now

@NoArgsConstructor
@AllArgsConstructor
@Configuration
@ConditionalOnProperty(prefix = "spring.redis", name = {"endpoint"}, havingValue = "true")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition should also be checking host, not endpoint

Comment thread src/main/resources/application.yml Outdated
spring.redis.password:
#spring.redis.sentinel.master: mymaster
#spring.redis.sentinel.nodes: localhost:26379
endpoint: false
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is obsolete now

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant import

@schernysh schernysh merged commit a52cf40 into master Oct 31, 2018
@schernysh schernysh deleted the improve-datasource branch October 31, 2018 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants