전체 글(152)
-
[Spring Security] Back-End - Spring Security설정(With JWT) - 3
앞서 기본 설정이 완료 되었다면 이제 SecurityConfig 파일을 하나씩 채워나가야 한다.URL 및 권한 나는 Database에서 URL에 따른 권한을 설정하기 때문에 FilterInvocationSecurityMetadataSource Interface를 구현하여 URL에 따른 권한을 설정하도록 한다.SecurityConfig.javapublic class SecurityConfig { private final SecurityService securityService; @Bean SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http .csrf(AbstractHttpConfigurer::disable) //Lo..
2024.11.28 -
[Spring Security] Back-End - Spring Security설정(With JWT) - 2
환경설정이 끝났으니 본격적으로 Security 설정을 시작하도록 한다.1. Spring Security Config Security 및 Annotation에 대해서는 별도 설명을 하지 않는다.package kr.co.infob.config.security;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.security.config.annotation.web.builders.HttpSecurity;import org.springframework.security.config.annotation.web.config..
2024.11.28 -
[Spring Security] Back-End - Spring Security설정(With JWT) - 1
Spring Boot 3 + Security + JWT 설정이클립스 설정기본 이클립스에 STS를 설치하여 사용하였다.1. 프로젝트 생성Finish 클릭 하여 프로젝트 생성2. build.gradle dependencies 추가plugins { id 'java' id 'org.springframework.boot' version '3.4.0' id 'io.spring.dependency-management' version '1.1.6'}group = 'kr.co.infob'version = '0.0.1-SNAPSHOT'java { toolchain { languageVersion = JavaLanguageVersion.of(23) }}configurations { compileOnly { extends..
2024.11.28 -
Windows 11 에 Local Redis 설정(Docker 아님)
Spring Boot3 + Security + JWT 를 구성하려다 보니 JWT에서 refresh Token 의 저장소를 구성하기 위해 Redis를 가 필요 했다.그래서 구글링 + ChatGTP를 이용하여 구성했다. 구성 방식은 아래와 같다.1. Linux용 Windows 하위 시스템 / 가상 머신 플랫폼 활성화 Windows의 기능 켜기/끄기 창에서 2. WSL 설치Windows PowerShell을 관리자 모드로 실행한다.아래 명령어를 실행한다.PS C:\> wsl --install3. WSL에서 사용할 수 있는 Linux 배포판 목록 확인PS C:\> wsl -l --online실행결과PS C:\> wsl -l --online다음은 설치할 수 있는 유효한 배포판 목록입니다.'wsl.exe --..
2024.11.20 -
Spring Boot + React + typescript 프로젝트
개발 환경Java 23, Spring Boot 3Spring Security 6Sprint + React + typescriptSpring Boot : 3.3.5Eclipse 환경 설정1. eclipse downloadhttps://www.eclipse.org/downloads/ Eclipse Downloads | The Eclipse FoundationThe Eclipse Foundation - home to a global community, the Eclipse IDE, Jakarta EE and over 415 open source projects, including runtimes, tools and frameworks.www.eclipse.org현 시점에 Eclipse 버전 : Eclipse ..
2024.11.14 -
[VSCode] "npm : 이 시스템에서 스크립트를 실행할 수 없으므로..." 오류 해결 방법
VScode 터미널에서 npm 사용시 PS D:\Develop\Workspace\202409\first-react-board\src\main\frontend> npm startnpm : 이 시스템에서 스크립트를 실행할 수 없으므로 C:\Program Files\nodejs\npm.ps1 파일을 로드할 수 없습니다. 자세한 내용은 about_Execution_Policies(https://go.microsoft.com/fwlink/?LinkID=135170)를 참조하십시오.위의 오류가 발생할 경우 위의 경로(https://go.microsoft.com/fwlink/?LinkID=135170)를 검색한 결과로 아래와 같은 PowerShell 정책을 가지고 있다고 한다.PowerShell 실행 정책이러한 정책..
2024.11.14