Skip to content
Snippets Groups Projects
Commit ed2d7262 authored by Jagan Gottimukkula's avatar Jagan Gottimukkula
Browse files

spring boot migration

parent 72362421
No related branches found
No related tags found
1 merge request!6Trusted ibm
Showing
with 201 additions and 121 deletions
HELP.md
target/
.mvn/wrapper/maven-wrapper.jar
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**
!**/src/test/**
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
### VS Code ###
.vscode/
### Other ###
.mvn
target/*
*/target
\ No newline at end of file
......@@ -2,31 +2,55 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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>
<parent>
<artifactId>os-indexer-boot-mvn</artifactId>
<groupId>com.slb</groupId>
<groupId>org.opendes.indexer</groupId>
<artifactId>indexer-service</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>indexer-service-azure</artifactId>
<version>1.0-SNAPSHOT</version>
<name>indexer-service-azure</name>
<description>Indexer Service Azure</description>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.slb</groupId>
<artifactId>indexer-service-root</artifactId>
<groupId>org.opendes.core</groupId>
<artifactId>indexer-search-core-azure</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.slb.core</groupId>
<artifactId>indexer-search-core-azure</artifactId>
<version>0.0.1-SNAPSHOT</version>
<groupId>org.opendes.indexer</groupId>
<artifactId>indexer-service-root</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<classifier>spring-boot</classifier>
<mainClass>
org.opendes.indexer.IndexerAzureApplication
</mainClass>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package org.opendes.indexer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class IndexerApplication {
public static void main(String[] args) {
SpringApplication.run(IndexerApplication.class, args);
}
public class IndexerAzureApplication {
public static void main(String[] args) {
SpringApplication.run(IndexerAzureApplication.class, args);
}
}
package org.opendes.util.indexer;
package org.opendes.indexer.azure.util;
import com.google.common.base.Strings;
import com.slb.core.model.AppEngineHeaders;
......
......@@ -2,32 +2,31 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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>
<parent>
<artifactId>os-indexer-boot-mvn</artifactId>
<groupId>com.slb</groupId>
<groupId>org.opendes.indexer</groupId>
<artifactId>indexer-service</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.slb</groupId>
<artifactId>indexer-service-gcp</artifactId>
<version>1.1-SNAPSHOT</version>
<version>1.0-SNAPSHOT</version>
<name>indexer-service-gcp</name>
<description>Indexer Service GCP</description>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.slb.core</groupId>
<artifactId>indexer-search-core-service-gcp</artifactId>
<version>1.0-SNAPSHOT</version>
<groupId>org.opendes.core</groupId>
<artifactId>indexer-search-core-gcp</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.slb</groupId>
<groupId>org.opendes.indexer</groupId>
<artifactId>indexer-service-root</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
<version>1.0-SNAPSHOT</version>
</dependency>
<!-- <dependency>-->
......@@ -59,5 +58,27 @@
<!-- </dependency>-->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<classifier>spring-boot</classifier>
<mainClass>
org.opendes.indexer.IndexerGcpApplication
</mainClass>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class IndexerGcpApplication {
public static void main(String[] args) {
SpringApplication.run(IndexerGcpApplication.class, args);
}
}
\ No newline at end of file
......@@ -12,18 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package org.opendes.indexer.publish;
package org.opendes.indexer.gcp.publish;
import com.google.api.gax.retrying.RetrySettings;
import com.google.cloud.pubsub.v1.Publisher;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.reflect.TypeToken;
import com.google.protobuf.ByteString;
import com.google.pubsub.v1.ProjectTopicName;
import com.google.pubsub.v1.PubsubMessage;
import com.google.gson.reflect.TypeToken;
import com.slb.core.model.AppEngineHeaders;
import com.slb.core.model.DeploymentEnvironment;
import com.slb.core.util.AppException;
......@@ -35,6 +34,7 @@ import org.opendes.client.gcp.PubSub.PubSubExtensions;
import org.opendes.client.multitenancy.ITenantFactory;
import org.opendes.client.multitenancy.TenantInfo;
import org.opendes.indexer.model.RecordStatus;
import org.opendes.indexer.publish.IPublisher;
import org.opendes.indexer.util.JobStatus;
import org.springframework.beans.factory.annotation.Autowired;
import org.threeten.bp.Duration;
......
package org.opendes.indexer.util;
package org.opendes.indexer.gcp.util;
import com.google.common.base.Strings;
import com.slb.core.model.AppEngineHeaders;
......@@ -6,11 +6,12 @@ import com.slb.core.model.DeploymentEnvironment;
import com.slb.core.util.*;
import org.apache.http.HttpStatus;
import org.opendes.client.api.DpsHeaders;
import org.opendes.indexer.util.IRequestInfo;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Map;
import static org.opendes.client.api.DpsHeaders.*;
import static org.opendes.client.api.DpsHeaders.AUTHORIZATION;
public class RequestInfoImpl implements IRequestInfo {
......
......@@ -3,16 +3,16 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.slb</groupId>
<artifactId>os-indexer-boot-mvn</artifactId>
<groupId>org.opendes.indexer</groupId>
<artifactId>indexer-service</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>com.slb</groupId>
<artifactId>indexer-service-root</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>indexer</name>
<description>Indexer Spring Boot</description>
<version>1.0-SNAPSHOT</version>
<name>indexer-service-root</name>
<description>Indexer Service Root</description>
<packaging>jar</packaging>
<!--<repositories>
<repository>
......@@ -28,11 +28,10 @@
</repositories>-->
<dependencies>
<dependency>
<groupId>com.slb.core</groupId>
<artifactId>indexer-search-service-core-root</artifactId>
<version>1.0-SNAPSHOT</version>
<groupId>org.opendes.core</groupId>
<artifactId>indexer-search-core-root</artifactId>
<version>1.0.0</version>
</dependency>
<!-- spring boot dependencies -->
<dependency>
......@@ -250,26 +249,26 @@
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<classifier>spring-boot</classifier>
<mainClass>
org.opendes.indexer.IndexerApplication
</mainClass>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<!-- <build>-->
<!-- <plugins>-->
<!-- <plugin>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <goals>-->
<!-- <goal>repackage</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <classifier>spring-boot</classifier>-->
<!-- <mainClass>-->
<!-- org.opendes.indexer.IndexerApplication-->
<!-- </mainClass>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<!-- </plugins>-->
<!-- </build>-->
</project>
......@@ -14,13 +14,12 @@
package org.opendes.indexer.model;
import com.slb.core.SwaggerDoc;
import com.slb.core.validation.ValidKind;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.NotBlank;
import org.opendes.indexer.SwaggerDoc;
@Data
@Builder
......
package org.opendes.indexer;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class IndexerApplicationTests {
// @Test
// public void contextLoads() {
// }
}
......@@ -11,33 +11,37 @@
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.slb</groupId>
<artifactId>os-indexer-boot-mvn</artifactId>
<groupId>org.opendes.indexer</groupId>
<artifactId>indexer-service</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<modules>
<module>indexer-service-root</module>
<module>indexer-service-gcp</module>
<module>indexer-service-azure</module>
</modules>
<description>Indexer Service</description>
<!-- <modules>-->
<!-- <module>indexer-service-root</module>-->
<!-- <module>indexer-service-gcp</module>-->
<!-- <module>indexer-service-azure</module>-->
<!-- </modules>-->
<properties>
<java.version>1.8</java.version>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.war.plugin>2.6</maven.war.plugin>
<appengine.maven.plugin>1.0.0</appengine.maven.plugin>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<failOnMissingWebXml>false</failOnMissingWebXml>
<spring-cloud.version>Greenwich.SR2</spring-cloud.version>
<springfox-version>2.7.0</springfox-version>
<spring-cloud.version>Greenwich.SR2</spring-cloud.version>
<!-- <java.version>1.8</java.version>-->
<!-- <maven.compiler.target>1.8</maven.compiler.target>-->
<!-- <maven.compiler.source>1.8</maven.compiler.source>-->
<!-- <maven.war.plugin>2.6</maven.war.plugin>-->
<!-- <appengine.maven.plugin>1.0.0</appengine.maven.plugin>-->
<!-- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>-->
<!-- <failOnMissingWebXml>false</failOnMissingWebXml>-->
<!-- <spring-cloud.version>Greenwich.SR2</spring-cloud.version>-->
<!-- <springfox-version>2.7.0</springfox-version>-->
</properties>
<profiles>
<profile>
<id>indexer-service-root</id>
<id>root</id>
<activation>
<!-- this profile is active by default -->
<activeByDefault>true</activeByDefault>
......@@ -49,7 +53,7 @@
</profile>
<profile>
<id>indexer-service-gcp</id>
<id>gcp</id>
<activation>
<property>
<name>vendor</name>
......@@ -63,7 +67,7 @@
</profile>
<profile>
<id>indexer-service-azure</id>
<id>azure</id>
<activation>
<property>
<name>vendor</name>
......@@ -77,30 +81,30 @@
</profile>
<!-- Unit test only -->
<profile>
<id>dev</id>
<properties>
<skip.unit.tests>false</skip.unit.tests>
<skip.integration.tests>true</skip.integration.tests>
</properties>
</profile>
<!-- Integration test only -->
<profile>
<id>integration-test</id>
<properties>
<skip.integration.tests>false</skip.integration.tests>
<skip.unit.tests>true</skip.unit.tests>
</properties>
</profile>
<!-- Unit and Integration tests combined -->
<profile>
<id>test-all</id>
<properties>
<skip.integration.tests>false</skip.integration.tests>
<skip.unit.tests>false</skip.unit.tests>
</properties>
</profile>
<!-- &lt;!&ndash; Unit test only &ndash;&gt;-->
<!-- <profile>-->
<!-- <id>dev</id>-->
<!-- <properties>-->
<!-- <skip.unit.tests>false</skip.unit.tests>-->
<!-- <skip.integration.tests>true</skip.integration.tests>-->
<!-- </properties>-->
<!-- </profile>-->
<!-- &lt;!&ndash; Integration test only &ndash;&gt;-->
<!-- <profile>-->
<!-- <id>integration-test</id>-->
<!-- <properties>-->
<!-- <skip.integration.tests>false</skip.integration.tests>-->
<!-- <skip.unit.tests>true</skip.unit.tests>-->
<!-- </properties>-->
<!-- </profile>-->
<!-- &lt;!&ndash; Unit and Integration tests combined &ndash;&gt;-->
<!-- <profile>-->
<!-- <id>test-all</id>-->
<!-- <properties>-->
<!-- <skip.integration.tests>false</skip.integration.tests>-->
<!-- <skip.unit.tests>false</skip.unit.tests>-->
<!-- </properties>-->
<!-- </profile>-->
</profiles>
</project>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment