나만의 개발 기록
close
프로필 배경
프로필 로고

나만의 개발 기록

  • 분류 전체보기 (275) N
    • backend (2)
      • 스프링 (91)
      • 코프링 (14)
      • 자바 (33)
      • 오류모음 (2)
    • frontend (33)
      • Javascript (14)
      • Jstl (2)
      • Vue (6)
      • 타임리프 (5)
      • React (4)
      • Typescript (1)
    • 데이터베이스 (4)
      • MYSQL (4)
    • native (16)
      • 안드로이드 (16)
    • DevOps (14)
      • AWS (4)
      • 젠킨스 (2)
      • Docker (2)
      • 깃허브 (1)
    • gis (26)
      • Openlayers (4)
      • LeafletJs (19)
      • 지오서버 (3)
    • 기타 (1) N
      • 소프트웨어 설치 (9)
      • 자격증 (3)
      • 개발용어 (17)
    • 부동산 (0)
  • 홈
  • 태그
  • 방명록

jsch를 활용한 spring java에서 ssh command 명령어 실행하기

프로젝트를 하다가 웹에서 버튼클릭시 서버에 설치된 파이썬 파일을 실행해야하는 일이 생겨서, 아래 관련 내용을 정리합니다. jsch란?JSCH는 Java에서 SSH 프로토콜을 지원하는 라이브러리로, SFTP, SCP, 포트 포워딩, 터널링 등의 기능을 제공합니다. Spring에서는 JSCH를 활용하여 원격 서버에 접속하고 파일을 업로드/다운로드하는 등의 작업을 수행할 수 있습니다. pom.xml com.jcraft jsch 0.1.55 build.gradleimplementation group: 'com.jcraft', name: 'jsch', version: '0.1.55' Controllerimport com.jcraft.jsch.ChannelExec;import com.jcraft.jsch.JSch;..

  • format_list_bulleted backend/스프링
  • · 2025. 2. 14.
  • textsms
[코프링] 9. Spring Kotlin Jpa Querydsl Security Jwt 적용

[코프링] 9. Spring Kotlin Jpa Querydsl Security Jwt 적용

jwt secret 생성https://jwtsecret.com/generate JwtSecret.com - Generate JWT Secrets OnlineFull secret is hidden for security.jwtsecret.com - 위사이트 접속후 32자 클릭, Generate 선택후 복사 application.ymlspring: # H2 Console 설정 h2: console: enabled: true # H2 Console을 사용할지 여부 path: /h2-console # H2 Console의 접근 경로 # 데이터베이스 설정 datasource: driver-class-name: org.h2.Driver # H2 드라이버 사용 url: ..

  • format_list_bulleted backend/코프링
  • · 2025. 2. 11.
  • textsms

[코프링] 8. Companion Object - 팩토리 메서드 패턴 설정

팩토리 메서드 패턴이란? 팩토리 메서드 패턴은 객체 생성을 캡슐화하여, 객체 생성 로직을 별도의 메서드로 분리하는 디자인 패턴 이를 통해 객체 생성 방식을 통제하고, 생성 과정이 변경되더라도 클라이언트 코드의 수정을 최소화 기존방식 (팩토리 메서드 미적용)val user = User( password = encoder.encode(signUpRequest.password), name = signUpRequest.name, age = signUpRequest.age, email = signUpRequest.email)- 기존 방식의코드는 api 메소드 마다 user 값을 setting 해주려면 하나하나 전부 setting 해줘야하는 단점이 있다. 변경된 방식 (팩토리 메서드 적용)va..

  • format_list_bulleted backend/코프링
  • · 2025. 2. 10.
  • textsms

[코프링] Kotlin Spring Boot Api에서 파라미터 not null, null 체크

package com.example.basic_kotlin_2025.controller.responseimport com.example.basic_kotlin_2025.model.http.UserRequestimport org.springframework.http.HttpStatusimport org.springframework.http.ResponseEntityimport org.springframework.web.bind.annotation.DeleteMappingimport org.springframework.web.bind.annotation.GetMappingimport org.springframework.web.bind.annotation.PathVariableimport org.springf..

  • format_list_bulleted backend/코프링
  • · 2025. 2. 10.
  • textsms
[코프링] 7. Spring Kotlin Jpa Querydsl BooleanExpression 동적쿼리 적용

[코프링] 7. Spring Kotlin Jpa Querydsl BooleanExpression 동적쿼리 적용

UserController.kt@GetMapping("/paged")fun getUsersWithPaging(pageable: Pageable, @RequestParam searchVal: String?): Page { // 페이징된 사용자 목록 반환 return querydslUserService.getUsersWithPaging(pageable, searchVal)}-> 지난번에 추가한 controller 해당 api에 @RequestParam으로 검색어를 받는부분을 추가 QuerydslUserService.kt package com.contact.management.serviceimport com.contact.management.dto.UserDtoimport com.contact.ma..

  • format_list_bulleted backend/코프링
  • · 2025. 2. 7.
  • textsms

[코프링] 6. Spring Kotlin Jpa Querydsl 적용, 페이징 예제

build.gradle.ktplugins { id("org.springframework.boot") version "3.4.2" id("io.spring.dependency-management") version "1.1.7" kotlin("jvm") version "1.9.25" kotlin("plugin.spring") version "1.9.25" kotlin("plugin.jpa") version "1.9.25" kotlin("kapt") version "1.9.25"}group = "com.contact"version = "0.0.1-SNAPSHOT"java { toolchain { languageVersion.set(JavaLanguageVersion.of(17)) }}repositories ..

  • format_list_bulleted backend/코프링
  • · 2025. 2. 7.
  • textsms
  • navigate_before
  • 1
  • 2
  • 3
  • 4
  • 5
  • ···
  • 24
  • navigate_next
공지사항
전체 카테고리
  • 분류 전체보기 (275) N
    • backend (2)
      • 스프링 (91)
      • 코프링 (14)
      • 자바 (33)
      • 오류모음 (2)
    • frontend (33)
      • Javascript (14)
      • Jstl (2)
      • Vue (6)
      • 타임리프 (5)
      • React (4)
      • Typescript (1)
    • 데이터베이스 (4)
      • MYSQL (4)
    • native (16)
      • 안드로이드 (16)
    • DevOps (14)
      • AWS (4)
      • 젠킨스 (2)
      • Docker (2)
      • 깃허브 (1)
    • gis (26)
      • Openlayers (4)
      • LeafletJs (19)
      • 지오서버 (3)
    • 기타 (1) N
      • 소프트웨어 설치 (9)
      • 자격증 (3)
      • 개발용어 (17)
    • 부동산 (0)
최근 글
인기 글
최근 댓글
태그
  • #java
  • #jstl
  • #AJAX
  • #spring
  • #CentOS
  • #Linux
  • #useragent
  • #JavaScript
  • #형변환
  • #charAt
전체 방문자
오늘
어제
전체
Copyright © 쭈미로운 생활 All rights reserved.
Designed by JJuum

티스토리툴바