putty ssh tunnel 지속

tool 2021. 1. 18. 13:59

세션(DEV_ 등) 선택 [LOAD]
Conection 선택 후, Seconds .... 에 입력 (eg. 180)
Session 선책 후, [SAVE]

https://blog.webhostpython.com/2016/01/14/how-to-prevent-an-ssh-timeout-in-putty/

	@Resource
	private EntityManagerFactory barEntityManagerFactory;
    
    ...
	
        EntityManager entityManager = barEntityManagerFactory.createEntityManager();
		EntityTransaction transaction = entityManager.getTransaction();

		transaction.begin();
		
        entityManager.createNativeQuery(" drop table bar ").executeUpdate();
		
        transaction.commit();


https://github.com/gratiartis/multids-demo/tree/now-with-spring-boot
https://scattercode.co.uk/2016/01/05/multiple-databases-with-spring-boot-and-spring-data-jpa/
https://scattercode.co.uk/2013/11/18/spring-data-multiple-databases/


#logging:
#  level: INFO
..
    url: jdbc:mysql://localhost:3306/foo_schema?useSSL=false&useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
    password: 1234
(application.yml)

    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>8.0.13</version>
    </dependency>
(pom.xml)

-- 첫번째 cmd 창에서
C:\Users\User1>plink -load MYTUNNEL_ -L 3307:localhost:3307

-- 새 cmd 창에서
C:\program files\....\bin> mysqldump.exe --column-statistics=0 --single-transaction -uscott0 -pcoff_scott0!@ -h 127.0.0.1 -P 3307 dragondb > dump.sql
 

* 원인 : metadata (JobRepository) 가 중복되어서 에러

* 조치 : parameter 를 넘겨서 처리한다

jojoldu.tistory.com/326

 



mysql 
dbeaver error
Unable to load authentication plugin 'caching_sha2_password'

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'passwd11';

deep-jin.tistory.com/entry/Connect-MySQL-with-DBeaver-Unable-to-load-authentication-plugin-cachingsha2password-%EC%97%90%EB%9F%AC



package com.example.demo;

/*https://github.com/hellokoding/hellokoding-courses/blob/master/spring-examples/spring-webflux/src/test/java/com/hellokoding/spring/WebClientTest.java
 * */
import org.junit.jupiter.api.Test;
//import org.springframework.http.HttpHeaders;
//import org.springframework.web.reactive.function.client.ClientResponse;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.core.publisher.Mono;
//import static org.springframework.web.reactive.function.BodyInserters.fromFormData;

import org.springframework.http.MediaType;
//import org.springframework.util.LinkedMultiValueMap;
//import org.springframework.util.MultiValueMap;

import static org.assertj.core.api.Assertions.assertThat;

public class WebClientTest {
	
   
    @Test
    public void buildAnHttpRequest() {
        WebClient webClient = WebClient.create("http://localhost:8080");

		String request = "{\"id\":[\"HongKildong\"],\"name\":\"홍길동\"}";
        
        Mono<String> result = webClient.mutate()
                .baseUrl("http://localhost:8080")
                .build()
                .post()
                .uri("/member/register")
                .bodyValue(request)
                .accept(MediaType.APPLICATION_JSON)
                .retrieve()
                .bodyToMono(String.class);

        assertThat(result.block())
        		.isEqualTo("{\"attributes\":{},\"message\":\"등록 성공했습니다\"}");
    }
  

    
    
}

> wmic csproduct get name
Name
15UD470-GX5HK