리오의 개발일지
close
프로필 사진

리오의 개발일지

github: @dldydtjs2965

  • 분류 전체보기
    • 프로젝트
    • 데이터베이스
      • Redis
      • Elasticsearch
    • JAVA
    • Python
      • Flask
    • Javascript
      • Node.js
      • React
      • Nest.js
    • Git
    • 인공지능
      • Claude
    • CS
      • 알고리즘
    • 일상
    • 도서
    • devops
      • aws
    • spring
      • SpringBoot
      • Spring Security
      • JPA
  • 홈
  • 태그
  • 방명록
(스프링 부트) 구글 로그인 구현

(스프링 부트) 구글 로그인 구현

1. Security 설정 스프링 시큐리티를 사용하는데 쓸 기능들을 명시해준다 @RequiredArgsConstructor // 스프링 시큐리티 설정 활성화 @EnableWebSecurity public class SecurityConfig extends WebSecurityConfigurerAdapter { private final CustomOAuth2UserService customOAuth2UserService; protected void configure(HttpSecurity http) throws Exception { http .csrf().disable() .headers().frameOptions().disable().disable() .authorizeRequests() //URL 별 ..

  • format_list_bulleted spring/SpringBoot
  • · 2021. 7. 13.
(Spring Boot)TestRestTemplate null request Error

(Spring Boot)TestRestTemplate null request Error

TestCode @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment= SpringBootTest.WebEnvironment.RANDOM_PORT) @Transactional public class GamesApiControllerTest extends TestCase { @Autowired private TestRestTemplate restTemplate; @LocalServerPort private int port; @Test public void testGamesReResponse() { Integer request = 1; String url = "http://localhost:"+port+"/api/appendGames"; //when Re..

  • format_list_bulleted spring/SpringBoot
  • · 2021. 7. 12.
(Spring Boot)Entity에 있는 리스트 조회 제한하기

(Spring Boot)Entity에 있는 리스트 조회 제한하기

문제점 너무 많은 태그들이 나와서 태그 개수를 제한해야함. 해결책 public GameLimitTagListResponseDto(Game entity) { this.gameId = entity.getGameId(); this.gameName = entity.getGameName(); this.gameInfo = entity.getGameInfo(); this.launchDate = entity.getLaunchDate(); this.evaluation = entity.getEvaluation(); this.imgUrl = entity.getImgUrl(); this.videoUrl = entity.getVideoUrl(); this.devCompany = entity.getDevCompany(); thi..

  • format_list_bulleted spring/SpringBoot
  • · 2021. 7. 8.
(디버깅)일대다 양방향 Response Error

(디버깅)일대다 양방향 Response Error

Error log java.lang.IllegalStateException: Cannot call sendError() after the response has been committed Game @Getter @Entity @Table(name = "GAMES") @NoArgsConstructor public class Game { // 게임 아이디(PK) @Id @Column(name = "GAME_ID") private Long gameId; // 게임 이름 @Column(name = "GAME_NAME") private String gameName; // 게임 정보 @Column(name = "GAME_INFO") private String gameInfo; ... @OneToMany(mapped..

  • format_list_bulleted spring/SpringBoot
  • · 2021. 7. 2.
(Spring Boot) AOP 동작원리

(Spring Boot) AOP 동작원리

1. AOP란 어떤 서비스나 메서드가 실행되기전에 공통적으로 들어 가야할 이벤트, 메서드 등이 필요 할때 사전에 정의해둔 클래스를 작동하고 나서 실제 서비스가 작동하게 하는 것. 2. AOP의 장점 불필요한 비지니스 로직이 줄어서 좀 더 직관적인 비지니스 로직을 짤 수 있음. 3. 사용 예시 @Aspect @Component public class TimeTraceAop { @Around("execution(* hello.hellospring..*(..))") public Object execute(ProceedingJoinPoint joinPoint) throws Throwable { long start = System.currentTimeMillis(); System.out.println("START..

  • format_list_bulleted spring/SpringBoot
  • · 2021. 6. 25.
(스프링) jdbc,  jdbcTemplate 차이.

(스프링) jdbc, jdbcTemplate 차이.

1. jdbc 란 JDBC는 자바에서 데이터베이스에 접속할 수 있도록 하는 자바 API이다. 2. jdbc 사용 -연결 private Connection getConnection() { return DataSourceUtils.getConnection(dataSource); } .getConnection(datasource) 주어진 데이터 소스에서 JDBC 연결 - 사용 public Member save(Member member) { String sql = "insert into member(name) values(?)"; Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; try { conn = getConnectio..

  • format_list_bulleted spring/SpringBoot
  • · 2021. 6. 23.
  • navigate_before
  • 1
  • 2
  • 3
  • 4
  • navigate_next
공지사항
전체 카테고리
  • 분류 전체보기
    • 프로젝트
    • 데이터베이스
      • Redis
      • Elasticsearch
    • JAVA
    • Python
      • Flask
    • Javascript
      • Node.js
      • React
      • Nest.js
    • Git
    • 인공지능
      • Claude
    • CS
      • 알고리즘
    • 일상
    • 도서
    • devops
      • aws
    • spring
      • SpringBoot
      • Spring Security
      • JPA
인기 글
전체 방문자
오늘
어제
Copyright © ri5 모든 권리 보유.
SKIN: Copyright © 쭈미로운 생활 All rights reserved. Designed by JJuum.
and Current skin "dev-roo" is modified by Jin.

티스토리툴바