-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DependencyInjection: created DI for reqHandler and Neo4jDAO
- Loading branch information
1 parent
7ee45e8
commit 7a9924c
Showing
5 changed files
with
33 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,25 @@ | ||
package ca.utoronto.utm.mcs; | ||
|
||
import dagger.Module; | ||
import dagger.Provides; | ||
import org.neo4j.driver.*; | ||
|
||
|
||
@Module | ||
public class ReqHandlerModule { | ||
// TODO Complete This Module | ||
private final String uriDb = "bolt://localhost:7687"; | ||
private final String username = "neo4j"; | ||
private final String password = "123456"; | ||
|
||
@Provides | ||
public Neo4jDAO provideNeo4jDAO(Driver driver) { | ||
|
||
return new Neo4jDAO(driver); | ||
} | ||
|
||
@Provides | ||
public Driver provideDriver(){ | ||
return GraphDatabase.driver(this.uriDb, AuthTokens.basic(this.username, this.password)); | ||
} | ||
} |