@@ -50,30 +50,30 @@ public class DBConfiguration {
50
50
@ Value ("${ssh.local-port}" )
51
51
private int localPort ;
52
52
53
- @ Bean
54
- public DataSource dataSource () throws Exception {
55
-
56
- JSch jsch = new JSch ();
57
- Session session = jsch .getSession (
58
- kmsService .decrypt (sshUsername ),
59
- kmsService .decrypt (sshHost ),
60
- sshPort
61
- );
62
- session .setPassword (kmsService .decrypt (sshPassword ));
63
- session .setConfig ("StrictHostKeyChecking" , "no" );
64
- session .connect ();
65
-
66
- int assignedPort = session .setPortForwardingL (0 ,
67
- kmsService .decrypt (originUrl ),
68
- localPort
69
- );
70
-
71
- return DataSourceBuilder .create ()
72
- .url (kmsService .decrypt (databaseUrl ).replace (Integer .toString (localPort ), Integer .toString (assignedPort )))
73
- .username (kmsService .decrypt (databaseUsername ))
74
- .password (kmsService .decrypt (databasePassword ))
75
- .build ();
76
- }
53
+ // @Bean
54
+ // public DataSource dataSource() throws Exception {
55
+
56
+ // JSch jsch = new JSch();
57
+ // Session session = jsch.getSession(
58
+ // kmsService.decrypt(sshUsername),
59
+ // kmsService.decrypt(sshHost),
60
+ // sshPort
61
+ // );
62
+ // session.setPassword(kmsService.decrypt(sshPassword));
63
+ // session.setConfig("StrictHostKeyChecking", "no");
64
+ // session.connect();
65
+
66
+ // int assignedPort = session.setPortForwardingL(0,
67
+ // kmsService.decrypt(originUrl),
68
+ // localPort
69
+ // );
70
+
71
+ // return DataSourceBuilder.create()
72
+ // .url(kmsService.decrypt(databaseUrl).replace(Integer.toString(localPort), Integer.toString(assignedPort)))
73
+ // .username(kmsService.decrypt(databaseUsername))
74
+ // .password(kmsService.decrypt(databasePassword))
75
+ // .build();
76
+ // }
77
77
78
78
@ Bean
79
79
public DataSource dataSource () {
0 commit comments