SPC q q
- quitSPC w /
- split window verticallySPC w
- - split window horizontallySPC 1
- switch to window 1SPC 2
- switch to window 2SPC w c
- delete current windowSPC TAB
- switch to previous bufferSPC b b
- switch buffers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.dvliman.demo | |
// src/main/kotlin/com/dvliman/Router.kt | |
import com.dvliman.demo.user.UserHandler | |
import org.springframework.context.annotation.Bean | |
import org.springframework.http.MediaType.APPLICATION_JSON | |
import org.springframework.stereotype.Component | |
import org.springframework.web.reactive.function.server.router |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/main/kotlin/com/dvliman/user/UserHandler | |
package com.dvliman.demo.user | |
import org.springframework.http.HttpStatus | |
import org.springframework.http.MediaType.APPLICATION_JSON | |
import org.springframework.web.bind.annotation.RestController | |
import org.springframework.web.reactive.function.server.ServerRequest | |
import org.springframework.web.reactive.function.server.ServerResponse | |
import reactor.core.publisher.Mono |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/main/kotlin/com/dvliman/demo/user/UserRepo.kt | |
package com.dvliman.demo.user | |
import org.davidmoten.rx.jdbc.Database | |
import org.davidmoten.rx.jdbc.Parameter | |
import org.springframework.stereotype.Component | |
import reactor.core.publisher.Mono | |
import reactor.core.publisher.Flux | |
import reactor.core.publisher.toFlux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/main/kotlin/com/dvliman/demo/user/UserModels.kt | |
package com.dvliman.demo.user | |
import org.springframework.web.reactive.function.server.ServerResponse | |
import org.springframework.http.MediaType.APPLICATION_JSON | |
import reactor.core.publisher.Mono | |
data class User( | |
val user_id: Int, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/main/resources/application.properties | |
demo.db.url = jdbc:postgresql://localhost/demo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/main/kotlin/com/dvliman/demo/Beans.kt | |
package com.dvliman.demo | |
import org.davidmoten.rx.jdbc.Database | |
import org.springframework.context.annotation.Bean | |
import org.springframework.context.annotation.Configuration | |
@Configuration | |
class Beans { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// build.gradle | |
dependencies { | |
implementation 'com.github.davidmoten:rxjava2-jdbc:0.2.2' | |
implementation 'org.postgresql:postgresql:42.2.5' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/main/kotlin/com/dvliman/demo/Config.kt | |
package com.dvliman.demo; | |
import org.springframework.beans.factory.annotation.Value | |
import org.springframework.context.annotation.Component | |
@Component | |
class Config { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO users (name, email) VALUES ('some-name', 'some-email'); | |
SELECT * FROM users; | |
SELECT user_id, name, email FROM users WHERE user_id = '1'; |