오류해결

· 오류해결
새 프로젝트를 생성해서 MySQL을 연결했는데 해당 에러가 발생했습니다. Access denied for user 'root'@'localhost' (using password: YES) spring: jpa: hibernate: ddl-auto: create show-sql: true datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://127.0.0.1:3306/stock_example username: root password: 0000 yml 설정은 위와 같았고 cmd로 mysql 실행했을 때 비밀번호 0000으로 정상적으로 접속 성공했습니다. 많은 블로그 내용을 찾아봤지만 결국 password를 읽지 못하는 문제였고 ..
· 오류해결
현재 서버에 배포한 Swagger로 테스트를 진행하는데 계속 403 에러가 발생했다. 이것도 마찬가지... 근데 이상한 점이 있었다 GET 요청은 응답이 제대로 온다. 서버 로그를 찍어봤는데 GET 요청 말고는 JWT필터도 타지 않는다. 즉 시큐리티도 안들어오는데 이상하다 분명 먼저 내용을 찾아보니 csrf를 허용해놓으면 post, patch, delete, put이 403이 뜰 수 있다고 했다. // csrf 보호 비활성화 .csrf(AbstractHttpConfigurer::disable) 근데 시큐리티 설정에 disable을 이미 해놨기에 이 부분은 패스했다. 알고보니 결국 cors 문제였다. 내가 알기로는 cors 문제가 생기면 swagger에서 cors 문제라고 알려줬었는데 왜 안떴는지 아직은 ..
· 오류해결
우선 테스트하려고 하는 2개의 클래스이다. Scrum @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "team_id") private Team team; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "user_id") private User user; @Column(nullable = false) private String name; @CreatedDate @Column(nullable = false) private LocalDateTime createdDate; @Colum..
· 오류해결
현재 프로젝트를 진행하면서 http://localhost:8080으로 요청을 보내면 시큐리티의 oauth2Login()이 동작하는 기상천외한 문제가 발생했다. // 모든 요청 허용 .authorizeHttpRequests(authorize -> { // 모든 api로 시작하는 요청은 인증 필요 authorize.requestMatchers("/oauth2/authorization/", "/swagger-ui/**", "/api-docs", "/v3/api-docs/**", "/api-docs/**", "/swagger-ui.html").permitAll(); authorize.anyRequest().authenticated(); }) .addFilterBefore(jwtFilter, UsernamePas..
· 오류해결
프로젝트를 진행하면서 유저 로그인을 진행하는데 406 에러가 발생하는 상황이 있었다. 스프링부트와 리액트를 사용했고 내부 서비스는 전부 동작해서 DB에 값 수정까지 됐지만응답을 하는 과정에서 406 에러가 발생했다. 나는 ApiResponse를 따로 만들어서 json 응답을 생성하였다. package com.parkchoi.scrum.util.api;public class ApiResponse { // 상태 구분1 private static final String SUCCESS_STATUS = "success"; private static final String FAIL_STATUS = "fail"; private static final String ERROR_STATUS = "er..
· 오류해결
기존에는 스프링부트 2.x를 사용해서 시큐리티 설정을 했었다. package com.parkchoi.scrum.config; 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.configuration.EnableWebSecurity; import org.springframework.security.config...
· 오류해결
평소처럼 파이프라인을 작성해서 실행했는데 /var/jenkins_home/workspace/backend-pipeline@tmp/durable-f2782b40/script.sh: 6: Syntax error: Unterminated quoted string 위와 같은 에러가 발생했다. 파이프라인에서 많이 만나는 문법 에러라는데 pipeline { agent any stages { // 현재 작업 공간 내의 모든 것을 삭제 stage('Clean Workspace') { steps { deleteDir() } } // 깃허브 클론을 진행 stage('github Clone') { steps { git branch: 'backend', credentialsId: 'parkgihyeon_user_pass', ..
· 오류해결
스프링부트 3 버전을 사용하면서 이전 프로젝트를 실행시키는데 아래와 같은 에러가 발생했다. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.2.0 Caused by: org.gradle.internal.component.NoMatchingGraphVariantsException: No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.2.0 was found. The consumer was configured to find a library for use during runtime, compatible with ..
indeep
'오류해결' 카테고리의 글 목록 (2 Page)