Skip to content

Commit 2683801

Browse files
committed
chore: clean codes
1 parent 260c88c commit 2683801

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

server/src/main/kotlin/com/example/demo/RSocketServerApplication.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication
55
import org.springframework.boot.runApplication
66
import org.springframework.context.annotation.Bean
77
import org.springframework.data.annotation.Id
8-
import org.springframework.data.mongodb.core.CollectionOptions
98
import org.springframework.data.mongodb.core.ReactiveMongoTemplate
109
import org.springframework.data.mongodb.core.mapping.Document
1110
import org.springframework.data.mongodb.repository.ReactiveMongoRepository
@@ -16,15 +15,12 @@ import reactor.core.publisher.Flux
1615
import java.time.Instant
1716

1817
@SpringBootApplication
19-
class RSocketServerApplication{
18+
class RSocketServerApplication {
2019

2120
@Bean
2221
fun runner(template: ReactiveMongoTemplate) = CommandLineRunner {
2322
println("running CommandLineRunner...")
24-
template.executeCommand("{\"convertToCapped\": \"messages\", size: 100000}")
25-
.subscribe(::println)
26-
// template.dropCollection(Message::class.java).then().block();
27-
// template.createCollection(Message::class.java, CollectionOptions.empty().capped().size(100000L)).then().block()
23+
template.executeCommand("{\"convertToCapped\": \"messages\", size: 100000}").log().subscribe(::println)
2824
}
2925
}
3026

0 commit comments

Comments
 (0)