@CompoundIndexes(value=@CompoundIndex(name="email_idx", def="{'emailAddress':1}", unique=true))
public class User extends BaseEntity implements UserDetails {
This breaks the MongoDbConfigurationTest tests with this error , it looks like Mongo is not running ?
Caused by: com.mongodb.MongoServerSelectionException: Unable to connect to any server that matches AnyServerSelector{}
at com.mongodb.BaseCluster.getServer(BaseCluster.java:80)
at com.mongodb.DBTCPConnector.getServer(DBTCPConnector.java:666)
at com.mongodb.DBTCPConnector.access$300(DBTCPConnector.java:42)
at com.mongodb.DBTCPConnector$MyPort.getConnection(DBTCPConnector.java:511)
at com.mongodb.DBTCPConnector$MyPort.get(DBTCPConnector.java:459)
at com.mongodb.DBTCPConnector.getPrimaryPort(DBTCPConnector.java:417)
at com.mongodb.DBCollectionImpl.createIndex(DBCollectionImpl.java:337)
at com.mongodb.DBCollection.createIndex(DBCollection.java:564)
at org.springframework.data.mongodb.core.index.MongoPersistentEntityIndexCreator.createIndex(MongoPersistentEntityIndexCreator.java:135)
....
.....
If you add this to User.java for example :
@CompoundIndexes(value=@CompoundIndex(name="email_idx", def="{'emailAddress':1}", unique=true)) public class User extends BaseEntity implements UserDetails {
This breaks the MongoDbConfigurationTest tests with this error , it looks like Mongo is not running ?
Caused by: com.mongodb.MongoServerSelectionException: Unable to connect to any server that matches AnyServerSelector{} at com.mongodb.BaseCluster.getServer(BaseCluster.java:80) at com.mongodb.DBTCPConnector.getServer(DBTCPConnector.java:666) at com.mongodb.DBTCPConnector.access$300(DBTCPConnector.java:42) at com.mongodb.DBTCPConnector$MyPort.getConnection(DBTCPConnector.java:511) at com.mongodb.DBTCPConnector$MyPort.get(DBTCPConnector.java:459) at com.mongodb.DBTCPConnector.getPrimaryPort(DBTCPConnector.java:417) at com.mongodb.DBCollectionImpl.createIndex(DBCollectionImpl.java:337) at com.mongodb.DBCollection.createIndex(DBCollection.java:564) at org.springframework.data.mongodb.core.index.MongoPersistentEntityIndexCreator.createIndex(MongoPersistentEntityIndexCreator.java:135) .... .....