examples updated

This commit is contained in:
stvort
2021-06-18 20:27:45 +04:00
parent 05e9b50fa5
commit 6b9fdae084
7 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.3</version>
<version>2.5.1</version>
<relativePath/>
</parent>
@@ -9,7 +9,7 @@ import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;
@ConditionalOnProperty(name = "use.swing", havingValue = "false")
@ConditionalOnProperty(name = "use.console", havingValue = "true")
@Service
public class ConsoleIOService implements IOService {
private final PrintStream out;
@@ -17,7 +17,7 @@ public class ConsoleIOService implements IOService {
public ConsoleIOService(@Value("#{T(java.lang.System).out}") PrintStream out,
@Value("#{T(java.lang.System).in}")InputStream in) {
@Value("#{T(java.lang.System).in}") InputStream in) {
this.out = out;
this.sc = new Scanner(in);
}
@@ -6,7 +6,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import ru.otus.ioservice.example.poll.PollService;
@ConditionalOnProperty(name = "use.swing", havingValue = "false")
@ConditionalOnProperty(name = "use.console", havingValue = "true")
@Configuration
public class UIConfig {
@@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Service;
import ru.otus.ioservice.example.api.IOService;
@ConditionalOnProperty(name = "use.swing", havingValue = "true")
@ConditionalOnProperty(name = "use.console", havingValue = "false")
@RequiredArgsConstructor
@Service
public class SwingIOService implements IOService {
@@ -8,7 +8,7 @@ import ru.otus.ioservice.example.poll.PollService;
import java.awt.*;
@ConditionalOnProperty(name = "use.swing", havingValue = "true")
@ConditionalOnProperty(name = "use.console", havingValue = "false")
@Configuration
public class UIConfig {
@@ -1 +1 @@
use.swing: true
use.console: true
@@ -14,9 +14,9 @@
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<lombok.version>1.18.18</lombok.version>
<spring.version>5.3.4</spring.version>
<junit.jupiter.version>5.7.1</junit.jupiter.version>
<mockito.version>3.8.0</mockito.version>
<spring.version>5.3.8</spring.version>
<junit.jupiter.version>5.7.2</junit.jupiter.version>
<mockito.version>3.11.0</mockito.version>
<assertj.version>3.19.0</assertj.version>
</properties>