Seemingly Online
close
프로필 배경
프로필 로고

Seemingly Online

  • 카테고리 (571)
    • Language (250)
      • 알고리즘 (100)
      • Java (144)
      • python (2)
      • Kotlin (4)
    • WEB (141)
      • Spring (24)
      • Spring Security (3)
      • Next.js (3)
      • TypeScript (3)
      • JavaScript (45)
      • jQuery (7)
      • CSS (25)
      • XML (3)
      • Maven (1)
      • Gradle (1)
      • JSP (1)
      • Thymeleaf (10)
      • HTML (11)
      • MyBatis (1)
      • JPA (3)
    • App (45)
      • Flutter (34)
      • Dart (4)
      • Android (2)
      • IOS (3)
      • Firebase (2)
    • Git (6)
      • GitHub (6)
    • AWS (15)
      • SCT (2)
      • Amazon Aurora (1)
      • S3 (2)
      • EventBridge (1)
      • EC2 (7)
      • EFS (1)
    • DataBase (44)
      • MySQL (19)
      • Oracle SQL (19)
      • Postgre-SQL (6)
    • OS (33)
      • Linux (27)
      • Windows (1)
      • Mac (5)
    • Tool (15)
      • DocKer (6)
      • Intellij (7)
      • VScode (2)
    • IT (17)
      • Developer-etc (13)
      • 개발상식 (4)
    • CodePen (2)
      • 캐러셀 (2)
  • 홈
  • 방명록
[Spring] 스프링 부트 최초 실행 init 메소드 생성 방법

[Spring] 스프링 부트 최초 실행 init 메소드 생성 방법

2022-11-14 1. 방법 최초 실행하고 싶은 메서드를 우선적으로 만든 후 아래와 같이 코드를 작성한다. import org.springframework.beans.factory.InitializingBean; import org.springframework.stereotype.Component; import lombok.RequiredArgsConstructor; @Component @RequiredArgsConstructor public class ServiceInit implements InitializingBean{ private final ServiceInitTest serviceInitTest; //자신이 사용하고자 하는 클래스를 작성 @Override public void afterPro..

  • format_list_bulleted WEB/Spring
  • · 2022. 11. 14.
  • textsms
[Spring] Properties 파일 배열 형태로 저장 및 불러오기

[Spring] Properties 파일 배열 형태로 저장 및 불러오기

2022-10-28 1. 방법 test.properties 파일 내용 test=test1;test2;test3 properties 파일의 value에 구분하고 싶은 문자열을 두고 ; 를 구분 기호로 사용하였다. @Configuration 파일 내용 @Configuration @PropertySources({ @PropertySource(name = "app", value = "classpath:config/test.properties", encoding = "UTF-8") }) @Getter public class PropertiesConfig implements EnvironmentAware { @Override public void setEnvironment(Environment env) { } //..

  • format_list_bulleted WEB/Spring
  • · 2022. 10. 28.
  • textsms
[Spring] @Bean 과 @Component 의 차이를 알아보자.

[Spring] @Bean 과 @Component 의 차이를 알아보자.

2022-08-09 @Bean과 @Component는 두 개다 스피링 IOC의 객체를 생성하는 기능을 한다. 이 둘의 차이점을 알아보자. 1. @Bean vs @Component 우선 @Bean 은 @Configuration와 세트로 사용된다. @Configuration은 기존의 config (XML에서 작성하던) 형식의 파일들을 java.class 형태로 작성할 수 있도록 도와주는 어노테이션이다. @Configuration 안에는 IOC에 들어간 bean이 필요한데, 이러한 객체를 생성하는 메서드에게 @Bean 어노테이션을 적어준다. 예로는 아래와 같이 DB 접속 정보가 들어간 config 파일에 사용한다. @Configuration public class DatasourceConfig { @Bean ..

  • format_list_bulleted WEB/Spring
  • · 2022. 8. 9.
  • textsms
[Spring] .properties 파일 getter로 불러오는[읽는] 방법

[Spring] .properties 파일 getter로 불러오는[읽는] 방법

2022-06-10 정적이 파일 properties 에는 주로 config(설정 관련 값)들이 들어 있다. 이들을 하나의 class화 시켜 getter로 사용하는 방법을 알아보자. 1. test.properties TEST_KEY=test123 우선 자신의 properties의 파일의 정확한 경로와 가져와야 하는 키/값을 알고 있어야 한다. 2. PropertiesConfig import org.springframework.beans.factory.annotation.Value; import org.springframework.context.EnvironmentAware; import org.springframework.context.annotation.Configuration; import org.sp..

  • format_list_bulleted WEB/Spring
  • · 2022. 6. 10.
  • textsms
[Spring] 스프링에서 robots.txt 적용하는 방법

[Spring] 스프링에서 robots.txt 적용하는 방법

2022-06-08 자신이 서비스하는 웹 애플리케이션에서 쓸데없이 로봇들이 크롤링하는 것들을 막을 수 있는 방법이 있다. robots.txt를 사용하는 건데 이를 spring에서는 어떻게 적용하는지 알아보자. - 방법 사실 방법은 매우 간단하다. /** * 봇 크롤링 막기 */ @RequestMapping(value = "/robots.txt") @ResponseBody public void robotsBlock(HttpServletRequest request, HttpServletResponse response) { try { response.getWriter().write("User-agent: *\nDisallow: /\n"); } catch (IOException e) { log.info("exc..

  • format_list_bulleted WEB/Spring
  • · 2022. 6. 8.
  • textsms
[Spring] HttpServletRequest 로 Body 내용 가져오기[json]

[Spring] HttpServletRequest 로 Body 내용 가져오기[json]

2022-05-06 기존에 @RequestBody 어노테이션을 사용하다가, content-type이 text/plain 형식의 json 데이터를 처리해야 하는데, [org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'text/plain;charset=UTF-8' not supported] 같은 오류가 발생하였으며, 이를 해결하는 방법을 찾아 공유하고자 한다. 방법은 아래와 같다. - 코드 @RequestMapping(value="/") public void test(HttpServletRequest request){ //body에 있는 제이슨을 받은 객체 String bodyJson = ""; StringBuilder str..

  • format_list_bulleted WEB/Spring
  • · 2022. 5. 6.
  • textsms
  • navigate_before
  • 1
  • 2
  • 3
  • 4
  • navigate_next
공지사항
전체 카테고리
  • 카테고리 (571)
    • Language (250)
      • 알고리즘 (100)
      • Java (144)
      • python (2)
      • Kotlin (4)
    • WEB (141)
      • Spring (24)
      • Spring Security (3)
      • Next.js (3)
      • TypeScript (3)
      • JavaScript (45)
      • jQuery (7)
      • CSS (25)
      • XML (3)
      • Maven (1)
      • Gradle (1)
      • JSP (1)
      • Thymeleaf (10)
      • HTML (11)
      • MyBatis (1)
      • JPA (3)
    • App (45)
      • Flutter (34)
      • Dart (4)
      • Android (2)
      • IOS (3)
      • Firebase (2)
    • Git (6)
      • GitHub (6)
    • AWS (15)
      • SCT (2)
      • Amazon Aurora (1)
      • S3 (2)
      • EventBridge (1)
      • EC2 (7)
      • EFS (1)
    • DataBase (44)
      • MySQL (19)
      • Oracle SQL (19)
      • Postgre-SQL (6)
    • OS (33)
      • Linux (27)
      • Windows (1)
      • Mac (5)
    • Tool (15)
      • DocKer (6)
      • Intellij (7)
      • VScode (2)
    • IT (17)
      • Developer-etc (13)
      • 개발상식 (4)
    • CodePen (2)
      • 캐러셀 (2)
최근 글
인기 글
최근 댓글
태그
  • #자바기초
  • #자바알고리즘
  • #자바
  • #BOJ
  • #백준
  • #Java
  • #백준알고리즘
  • #자바공부
  • #Java8
  • #backjoon
전체 방문자
오늘
어제
전체
Copyright © seemingljy All rights reserved.

티스토리툴바