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"
|
||||
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>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<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>
|
||||
<artifactId>spring-boot-cassandre</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>spring-boot-cassandre</name>
|
||||
<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 -->
|
||||
<dependency>
|
||||
<groupId>tech.cassandre.trading.bot</groupId>
|
||||
<artifactId>cassandre-trading-bot-spring-boot-starter</artifactId>
|
||||
<version>4.2.1</version>
|
||||
<version>${cassandre.trading.bot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.knowm.xchange</groupId>
|
||||
<artifactId>xchange-kucoin</artifactId>
|
||||
<version>5.0.7</version>
|
||||
<version>${xchange-kucoin.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hsqldb</groupId>
|
||||
<artifactId>hsqldb</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<version>${hsqldb.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- Cassandre dependencies -->
|
||||
<dependency>
|
||||
<groupId>tech.cassandre.trading.bot</groupId>
|
||||
<artifactId>cassandre-trading-bot-spring-boot-starter-test</artifactId>
|
||||
<version>4.2.1</version>
|
||||
<version>${cassandre.trading.bot.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.4.5</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<properties>
|
||||
<java.version>11</java.version>
|
||||
<cassandre.trading.bot.version>4.2.1</cassandre.trading.bot.version>
|
||||
<xchange-kucoin.version>5.0.7</xchange-kucoin.version>
|
||||
<hsqldb.version>2.5.1</hsqldb.version>
|
||||
</properties>
|
||||
|
||||
</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.OPENED;
|
|
@ -1,13 +1,13 @@
|
|||
package com.example.demo;
|
||||
package com.baeldung.trading;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class DemoApplication {
|
||||
public class TradingBotApplication {
|
||||
|
||||
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.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
@ -22,9 +22,9 @@ import tech.cassandre.trading.bot.test.mock.TickerFluxMock;
|
|||
@SpringBootTest
|
||||
@Import(TickerFluxMock.class)
|
||||
@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
|
||||
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