tradenity-java-sdk-spring-extensions

Simple library that allow straightforward and seamless integration between Tradenity's session and Spring MVC session.

Лицензия

Лицензия

Категории

Категории

Java Языки программирования
Группа

Группа

com.tradenity
Идентификатор

Идентификатор

java-sdk-spring-ext
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

tradenity-java-sdk-spring-extensions
Simple library that allow straightforward and seamless integration between Tradenity's session and Spring MVC session.
Ссылка на сайт

Ссылка на сайт

http://github.com/tradenity/java-sdk-spring-ext
Система контроля версий

Система контроля версий

https://github.com/tradenity/java-sdk-spring-ext/tree/master

Скачать java-sdk-spring-ext

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.tradenity/java-sdk-spring-ext/ -->
<dependency>
    <groupId>com.tradenity</groupId>
    <artifactId>java-sdk-spring-ext</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.tradenity/java-sdk-spring-ext/
implementation 'com.tradenity:java-sdk-spring-ext:1.0.1'
// https://jarcasting.com/artifacts/com.tradenity/java-sdk-spring-ext/
implementation ("com.tradenity:java-sdk-spring-ext:1.0.1")
'com.tradenity:java-sdk-spring-ext:jar:1.0.1'
<dependency org="com.tradenity" name="java-sdk-spring-ext" rev="1.0.1">
  <artifact name="java-sdk-spring-ext" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.tradenity', module='java-sdk-spring-ext', version='1.0.1')
)
libraryDependencies += "com.tradenity" % "java-sdk-spring-ext" % "1.0.1"
[com.tradenity/java-sdk-spring-ext "1.0.1"]

Зависимости

compile (8)

Идентификатор библиотеки Тип Версия
com.tradenity : java-sdk jar 1.0.1
javax.servlet : javax.servlet-api jar 3.0.1
org.springframework : spring-core jar 4.3.17.RELEASE
org.springframework : spring-beans jar 4.3.17.RELEASE
org.springframework : spring-context jar 4.3.17.RELEASE
org.springframework : spring-web jar 4.3.17.RELEASE
org.springframework : spring-webmvc jar 4.3.17.RELEASE
org.springframework.data : spring-data-commons jar 1.11.2.RELEASE

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 3.8.1

Модули Проекта

Данный проект не имеет модулей.

Welcome to the Spring framework extensions for Tradenity Java SDK

Prerequisites

Installation

The SDK is available through maven central, You can install it using any compatible tool.

Maven

<dependency>
    <groupId>com.tradenity</groupId>
    <artifactId>java-sdk-spring-ext</artifactId>
    <version>1.0.1</version>
</dependency>

Gradle

Add this line to the dependency section

compile com.tradenity:java-sdk-spring-ext:1.0.1

Ivy

<dependency org="com.tradenity" name="java-sdk-spring-ext" rev="1.0.1"/>

Setup your credentials

First of all, you have to get API keys for your store, you can find it in your store Edit page. To get there navigate to the stores list page, click on the Edit button next to your store name, scroll down till you find the API Keys section.

Initialize the library

Add your Store keys to .properties file:

application.properties

tradenity.publicKey=pk_xxxxxxxxxxxxxxxxxxxxxxx
tradenity.secretKey=sk_xxxxxxxxxxxxxxxxxxxxxxx

Make sure to replace the api keys with the ones for your store, otherwise you will get authentication error

On any spring @Configuration file add the @EnableTradenity

@EnableTradenity
@Configuration
public class AppConfiguration{
......
}

Make your First call

The Tradenity SDK is organized into a group of model entitiy classes that corresponds to the REST API's resources, each encapsulate the operation for a specific entity model, for example to perform operations related to the Brand resource you can use the corresponding tradenity.sdk.entities.Brand class.

Now, just call any method in your code.

@Autowired
BrandService brandService;

.....

Brand brand = brandService.findById("1243-9786786-jhgjtu-789s6i");

Tutorials and sample applications

We provide 2 sample applications, actually it is the same application implemented using 2 frameworks: Spring MVC, and Grails.

Live demo of Camerastore, check it out to have an idea of what Tradenity API can do.

You can find the code at github:

Camera store for spring mvc code.

Camera store for grails code.

We also provide a detailed explanation of the code of these sample applications in the form of a step by step tutorials:

Camera store for spring mvc tutorial.

Camera store for grails tutorial.

Версии библиотеки

Версия
1.0.1
1.0.0