JAVA-6222: Fix issues in the spring-boot-cassandre (#10988)
* JAVA-6222: Use parent-boot-2 in spring-boot-cassandre * JAVA-6222: Fix PMD violation * JAVA-6222: Cleanup pom.xml * JAVA-6222: Fix app and package names * JAVA-6222: Rename unit test to live test Co-authored-by: Krzysztof Woyke <krzysztof.woyke.sp@lhsystems.com>
This commit is contained in:
parent
6be73ffa3f
commit
fda111a5a1
|
@ -3,66 +3,50 @@
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<artifactId>spring-boot-cassandre</artifactId>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<packaging>jar</packaging>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<name>spring-boot-cassandre</name>
|
||||||
<version>2.4.5</version>
|
|
||||||
<relativePath /> <!-- lookup parent from repository -->
|
|
||||||
</parent>
|
|
||||||
<groupId>com.example</groupId>
|
|
||||||
<artifactId>demo</artifactId>
|
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
|
||||||
<name>Cassandre trading bot tutorial</name>
|
|
||||||
<description>Cassandre trading bot tutorial</description>
|
<description>Cassandre trading bot tutorial</description>
|
||||||
<properties>
|
|
||||||
<java.version>11</java.version>
|
|
||||||
</properties>
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>com.baeldung</groupId>
|
||||||
|
<artifactId>parent-boot-2</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<relativePath>../../parent-boot-2</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
<!-- Cassandre dependencies -->
|
<!-- Cassandre dependencies -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>tech.cassandre.trading.bot</groupId>
|
<groupId>tech.cassandre.trading.bot</groupId>
|
||||||
<artifactId>cassandre-trading-bot-spring-boot-starter</artifactId>
|
<artifactId>cassandre-trading-bot-spring-boot-starter</artifactId>
|
||||||
<version>4.2.1</version>
|
<version>${cassandre.trading.bot.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.knowm.xchange</groupId>
|
<groupId>org.knowm.xchange</groupId>
|
||||||
<artifactId>xchange-kucoin</artifactId>
|
<artifactId>xchange-kucoin</artifactId>
|
||||||
<version>5.0.7</version>
|
<version>${xchange-kucoin.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hsqldb</groupId>
|
<groupId>org.hsqldb</groupId>
|
||||||
<artifactId>hsqldb</artifactId>
|
<artifactId>hsqldb</artifactId>
|
||||||
<version>2.5.1</version>
|
<version>${hsqldb.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<!-- Cassandre dependencies -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>tech.cassandre.trading.bot</groupId>
|
<groupId>tech.cassandre.trading.bot</groupId>
|
||||||
<artifactId>cassandre-trading-bot-spring-boot-starter-test</artifactId>
|
<artifactId>cassandre-trading-bot-spring-boot-starter-test</artifactId>
|
||||||
<version>4.2.1</version>
|
<version>${cassandre.trading.bot.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<properties>
|
||||||
<plugins>
|
<java.version>11</java.version>
|
||||||
<plugin>
|
<cassandre.trading.bot.version>4.2.1</cassandre.trading.bot.version>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<xchange-kucoin.version>5.0.7</xchange-kucoin.version>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<hsqldb.version>2.5.1</hsqldb.version>
|
||||||
<version>2.4.5</version>
|
</properties>
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.example.demo;
|
package com.baeldung.trading;
|
||||||
|
|
||||||
import static tech.cassandre.trading.bot.dto.position.PositionStatusDTO.CLOSED;
|
import static tech.cassandre.trading.bot.dto.position.PositionStatusDTO.CLOSED;
|
||||||
import static tech.cassandre.trading.bot.dto.position.PositionStatusDTO.OPENED;
|
import static tech.cassandre.trading.bot.dto.position.PositionStatusDTO.OPENED;
|
|
@ -1,13 +1,13 @@
|
||||||
package com.example.demo;
|
package com.baeldung.trading;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class DemoApplication {
|
public class TradingBotApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(DemoApplication.class, args);
|
SpringApplication.run(TradingBotApplication.class, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.example.demo;
|
package com.baeldung.trading;
|
||||||
|
|
||||||
import static org.awaitility.Awaitility.await;
|
import static org.awaitility.Awaitility.await;
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
@ -22,9 +22,9 @@ import tech.cassandre.trading.bot.test.mock.TickerFluxMock;
|
||||||
@SpringBootTest
|
@SpringBootTest
|
||||||
@Import(TickerFluxMock.class)
|
@Import(TickerFluxMock.class)
|
||||||
@DisplayName("Simple strategy test")
|
@DisplayName("Simple strategy test")
|
||||||
public class MyFirstStrategyUnitTest {
|
public class MyFirstStrategyLiveTest {
|
||||||
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(MyFirstStrategyUnitTest.class);
|
private final Logger logger = LoggerFactory.getLogger(MyFirstStrategyLiveTest.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MyFirstStrategy strategy;
|
private MyFirstStrategy strategy;
|
|
@ -1,13 +0,0 @@
|
||||||
package com.example.demo;
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
||||||
|
|
||||||
@SpringBootTest
|
|
||||||
class DemoApplicationTests {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
void contextLoads() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue