BAEL-3777: Cleanup
This commit is contained in:
parent
ef3570baaf
commit
92640684d8
|
@ -5,8 +5,6 @@ import java.util.UUID;
|
|||
import org.springframework.data.cassandra.repository.CassandraRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baeldung.dddhexagonalspring.domain.Order;
|
||||
|
||||
@Repository
|
||||
public interface SpringDataCassandraOrderRepository extends CassandraRepository<OrderEntity, UUID>{
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package com.baeldung.dddhexagonalspring.infrastracture.repository.mongo;
|
||||
|
||||
import com.baeldung.dddhexagonalspring.domain.Order;
|
||||
import com.baeldung.dddhexagonalspring.domain.repository.OrderRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.baeldung.dddhexagonalspring.domain.Order;
|
||||
import com.baeldung.dddhexagonalspring.domain.repository.OrderRepository;
|
||||
|
||||
@Component
|
||||
public class MongoDbOrderRepository implements OrderRepository {
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
|
||||
spring.data.mongodb.host=localhost
|
||||
spring.data.mongodb.port=27017
|
||||
spring.data.mongodb.database=order-database
|
||||
|
|
|
@ -4,4 +4,6 @@ To run this project, follow these steps:
|
|||
|
||||
* Run the application database by executing `docker-compose up` in this directory.
|
||||
* Launch the Spring Boot Application (DomainLayerApplication).
|
||||
* By default, application will connect to this database (configuration in *ddd-layers.properties*)
|
||||
* By default, the application will connect to the one of the two databases (configuration in *ddd-layers.properties*)
|
||||
* check `CassandraDbOrderRepository.java` and `MongoDbOrderRepository.java`
|
||||
* switch between the databases by making one of the above beans primary using the `@Primary` annotation
|
Loading…
Reference in New Issue