Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
fix: renamed tigrisdb-->tigris
Browse files Browse the repository at this point in the history
  • Loading branch information
JigarJoshi committed Apr 26, 2022
1 parent 5f56bac commit 4a72610
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 28 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# tigrisdb-starter-java
A starter Java application for TigrisDB.
# tigris-starter-java
A starter Java application for Tigris.

[![java-ci](https://github.com/tigrisdata/tigrisdb-example-java/actions/workflows/java-ci.yml/badge.svg?branch=main)](https://github.com/tigrisdata/tigrisdb-example-java/actions/workflows/java-ci.yml)
[![java-ci](https://github.com/tigrisdata/tigris-starter-java/actions/workflows/java-ci.yml/badge.svg?branch=main)](https://github.com/tigrisdata/tigris-starter-java/actions/workflows/java-ci.yml)

# Quick start
- [documentation](https://docs.tigrisdata.com/quickstart/with-java)
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.tigrisdata</groupId>
<artifactId>tigrisdb-example-java</artifactId>
<version>1.0.0-alpha.6</version>
<artifactId>tigris-example-java</artifactId>
<version>1.0.0-alpha.8</version>

<dependencies>
<dependency>
<groupId>com.tigrisdata</groupId>
<artifactId>tigrisdb-client</artifactId>
<version>${tigrisdb.client.java.version}</version>
<artifactId>tigris-client</artifactId>
<version>${tigris.client.java.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -26,7 +26,7 @@
</dependencies>
<properties>
<!-- we are still pre-release -->
<tigrisdb.client.java.version>1.0.0-alpha.7</tigrisdb.client.java.version>
<tigris.client.java.version>1.0.0-alpha.8</tigris.client.java.version>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class TigrisDBStarterApplication {
public class TigrisStarterApplication {

public static void main(String[] args) {
new SpringApplication(TigrisDBStarterApplication.class).run(args);
new SpringApplication(TigrisStarterApplication.class).run(args);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class TigrisDBExceptionAdvice {
public class TigrisExceptionAdvice {

@ResponseBody
@ExceptionHandler(TigrisException.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;

public class TigrisDBInitializer implements CommandLineRunner {
public class TigrisInitializer implements CommandLineRunner {

private final TigrisClient tigrisDBClient;
private final TigrisClient tigrisClient;
private final String dbName;

private static final Logger log = LoggerFactory.getLogger(TigrisDBInitializer.class);
private static final Logger log = LoggerFactory.getLogger(TigrisInitializer.class);

public TigrisDBInitializer(TigrisClient tigrisDBClient, String dbName) {
this.tigrisDBClient = tigrisDBClient;
public TigrisInitializer(TigrisClient tigrisClient, String dbName) {
this.tigrisClient = tigrisClient;
this.dbName = dbName;
}

@Override
public void run(String... args) throws Exception {
log.info("createDbIfNotExists db: {}", dbName);
TigrisDatabase tigrisDatabase = tigrisDBClient.createDatabaseIfNotExists(dbName);
TigrisDatabase tigrisDatabase = tigrisClient.createDatabaseIfNotExists(dbName);
log.info("creating collections on db {}", dbName);
tigrisDatabase.createOrUpdateCollections(User.class, Product.class, Order.class);
log.info("Finished initializing TigrisDB");
log.info("Finished initializing Tigris");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
import org.springframework.context.annotation.Configuration;

@Configuration
public class TigrisDBSpringConfiguration {
public class TigrisSpringConfiguration {
@Bean
public TigrisDatabase tigrisDatabase(
@Value("${tigrisdb.db.name}") String dbName, TigrisClient client) {
@Value("${tigris.db.name}") String dbName, TigrisClient client) {
return client.getDatabase(dbName);
}

@Bean
public TigrisClient tigrisDBClient(
@Value("${tigrisdb.server.url}") String serverURL,
@Value("${tigrisdb.network.usePlainText:false}") boolean usePlainText) {
public TigrisClient tigrisClient(
@Value("${tigris.server.url}") String serverURL,
@Value("${tigris.network.usePlainText:false}") boolean usePlainText) {
TigrisConfiguration.NetworkConfig.Builder networkConfigBuilder =
TigrisConfiguration.NetworkConfig.newBuilder();
if (usePlainText) {
Expand All @@ -46,8 +46,8 @@ public TigrisClient tigrisDBClient(
}

@Bean
public TigrisDBInitializer tigrisDBInitializr(
TigrisClient tigrisDBClient, @Value("${tigrisdb.db.name}") String dbName) {
return new TigrisDBInitializer(tigrisDBClient, dbName);
public TigrisInitializer tigrisInitializr(
TigrisClient tigrisClient, @Value("${tigris.db.name}") String dbName) {
return new TigrisInitializer(tigrisClient, dbName);
}
}
4 changes: 2 additions & 2 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
server:
port: 8080

tigrisdb:
tigris:
db:
name: "tigrisdb-starter-java"
name: "tigris-starter-java"
server:
url: "localhost:8081"
network:
Expand Down

0 comments on commit 4a72610

Please sign in to comment.