This file contains 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
@Bean | |
ConnectionFactoryInitializer initializer(@Qualifier("connectionFactory") ConnectionFactory connectionFactory) { | |
ConnectionFactoryInitializer initializer = new ConnectionFactoryInitializer(); | |
initializer.setConnectionFactory(connectionFactory); | |
ResourceDatabasePopulator resource = | |
new ResourceDatabasePopulator(new ClassPathResource("schema.sql")); | |
initializer.setDatabasePopulator(resource); | |
return initializer; | |
} |
This file contains 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
CREATE TABLE IF NOT EXISTS member ( | |
id SERIAL PRIMARY KEY, | |
name TEXT NOT NULL | |
); |
This file contains 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
spring.r2dbc.url=r2dbc:postgresql://postgres@localhost:5432/reactive | |
logging.level.org.springframework.r2dbc=DEBUG |
This file contains 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
@RestController | |
@RequestMapping(value = "/api/member") | |
@RequiredArgsConstructor | |
public class MemberController { | |
private final MemberRepository memberRepository; | |
@GetMapping | |
public Flux<Member> getAll() { | |
return memberRepository.findAll(); |
This file contains 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
public interface MemberRepository extends R2dbcRepository<Member, Long> { | |
Mono<Member> findByName(String name); | |
} |
This file contains 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
@SpringBootApplication | |
public class ReactivePostgresApplication { | |
public static void main(String[] args) { | |
SpringApplication.run(ReactivePostgresApplication.class, args); | |
} | |
} |
This file contains 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
@Value | |
@Builder | |
public class Member { | |
@Id | |
private Long id; | |
private String name; | |
} |
This file contains 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
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}", | |
"profiles": |
This file contains 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
for /r "C:\Users\KHM\Downloads\" %x in (*.mkv) do move "%x" "C:\Users\KHM\Downloads\familyguy\" |
This file contains 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
# Find the latest version on https://github.com/creationix/nvm#install-script | |
# Install it on bash first | |
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash | |
# Add in your ~/.zshrc the following: | |
export NVM_DIR=~/.nvm | |
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" |
NewerOlder