Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 85 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,42 +24,48 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator</artifactId>
<version>3.0.0</version>
</dependency>

<!-- web development, including Tomcat and spring-webmvc -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>3.0.0</version>
</dependency>

<!-- Spring security -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<version>3.0.0</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<version>3.0.0</version>
<scope>provided</scope>
</dependency>

<!-- spring-data-jpa, spring-orm and Hibernate -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>3.0.0</version>
</dependency>

<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.193</version>
<version>2.1.214</version>
</dependency>

<!-- spring-test, hamcrest, ... -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>3.0.0</version>
<scope>test</scope>
</dependency>

Expand All @@ -73,38 +79,104 @@
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>2.4.0</version>
<version>2.7.0</version>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path-assert</artifactId>
<version>0.9.1</version>
<version>2.7.0</version>
<scope>test</scope>
</dependency>

<!-- integration with Swagger API doc generation http://goo.gl/J5FQDM -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.5.0</version>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.5.0</version>
<version>3.0.0</version>
</dependency>

<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.7.1</version>
<scope>runtime</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
<version>2.4.0-b180830.0359</version>
</dependency>
<dependency>
<groupId>com.khoubyari</groupId>
<artifactId>spring-boot-rest-example</artifactId>
<version>0.5.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10</version>
</dependency>
<dependency>
<groupId>serializable-fn</groupId>
<artifactId>serializable-fn</artifactId>
<version>1.1.4</version>
</dependency>
<dependency>
<groupId>io.github.portlek</groupId>
<artifactId>serializable</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>jp.co.ap-com</groupId>
<artifactId>spring-oauth2-serializable</artifactId>
<version>0.0.2</version>
</dependency>
<dependency>
<groupId>org.danekja</groupId>
<artifactId>jdk-serializable-functional</artifactId>
<version>1.9.0</version>
</dependency>
<dependency>
<groupId>org.aksw.commons</groupId>
<artifactId>aksw-commons-lambdas-serializable</artifactId>
<version>0.9.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator</artifactId>
<version>1.5.9.RELEASE</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
</dependency>
<dependency>
<groupId>com.google.collections</groupId>
<artifactId>google-collections</artifactId>
<version>18.0</version>
</dependency>
<dependency>
<groupId>com.google.collections</groupId>
<artifactId>google-collections</artifactId>
<version>1.0</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -135,4 +207,11 @@
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>clojars</id>
<name>Clojars</name>
<url>https://repo.clojars.org/</url>
</repository>
</repositories>
</project>
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
package com.khoubyari.example.api.rest.docs;

import com.google.common.base.Predicates;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;


Expand All @@ -20,16 +12,16 @@
@ComponentScan("com.khoubyari.example.api.rest")
public class SwaggerConfig {


@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any())
.paths(Predicates.not(PathSelectors.regex("/error")))
.build()
.apiInfo(apiInfo());
}
//
// @Bean
// public Docket api() {
// return new Docket(DocumentationType.SWAGGER_2)
// .select()
// .apis(RequestHandlerSelectors.any())
// .paths(Predicates.not(PathSelectors.regex("/error")))
// .build()
// .apiInfo(apiInfo());
// }


private ApiInfo apiInfo() {
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/com/khoubyari/example/domain/Hotel.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package com.khoubyari.example.domain;

import javax.persistence.*;
import javax.xml.bind.annotation.*;
import jakarta.persistence.*;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

/*
* a simple domain entity doubling as a DTO
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/com/khoubyari/example/model/CardholderName.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.khoubyari.example.model;

import org.codehaus.jackson.annotate.JsonProperty;

public class CardholderName<T> {

@JsonProperty("key")
public T key;

public T getKey(){
return key;
}

@Override
public String toString() {
return "CardholderName{" +
"key=" + key +
'}';
}
}
48 changes: 48 additions & 0 deletions src/main/java/com/khoubyari/example/model/NotificationData.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package com.khoubyari.example.model;

import javax.annotation.Nullable;
import java.io.Serializable;
import java.util.Optional;

public class NotificationData implements Serializable {

private String key;

private String value;

private String valueType;

public String getKey() {
return key;
}

public void setKey(String key) {
this.key = key;
}

public String getValue() {
return value;
}

public void setValue(String value) {
this.value = value;
}

@Nullable
public Optional<String> getValueType() {
return Optional.ofNullable(valueType);
}

public void setValueType(String valueType) {
this.valueType = valueType;
}

@Override
public String toString() {
return "NotificationData{" +
"key='" + key + '\'' +
", value='" + value + '\'' +
", valueType='" + valueType + '\'' +
'}';
}
}
45 changes: 45 additions & 0 deletions src/main/java/com/khoubyari/example/model/NotificationDataMap.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package com.khoubyari.example.model;

import java.util.List;

public class NotificationDataMap {

private String templateCode;

private String templateId;

private List<NotificationData> notificationDataList;

public String getTemplateCode() {
return templateCode;
}

public void setTemplateCode(String templateCode) {
this.templateCode = templateCode;
}

public String getTemplateId() {
return templateId;
}

public void setTemplateId(String templateId) {
this.templateId = templateId;
}

public List<NotificationData> getNotificationDataList() {
return notificationDataList;
}

public void setNotificationDataList(List<NotificationData> notificationDataList) {
this.notificationDataList = notificationDataList;
}

@Override
public String toString() {
return "NotificationDataMap{" +
"templateCode='" + templateCode + '\'' +
", templateId='" + templateId + '\'' +
", notificationDataList=" + notificationDataList +
'}';
}
}
36 changes: 36 additions & 0 deletions src/main/java/com/khoubyari/example/model/TableTestItem.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package com.khoubyari.example.model;

import org.codehaus.jackson.annotate.JsonProperty;

public class TableTestItem {

@JsonProperty("desc")
private String description;

@JsonProperty("no")
private String number;

public String getDescription() {
return description;
}

public void setDescription(String description) {
this.description = description;
}

public String getNumber() {
return number;
}

public void setNumber(String number) {
this.number = number;
}

@Override
public String toString() {
return "TableTestItem{" +
"description='" + description + '\'' +
", number='" + number + '\'' +
'}';
}
}
Loading