본문 바로가기
Spring boot Web project/기타

[Spring] 스프링 부트 Web project 기타 file 설정

by 데구르르르 2020. 2. 13.
728x90

 

=> 두파일 모두 src/main/resources 아래 위치

 

log4j2.xml

- basedir 에 값을 "가 / 나 / 다" 로 설정시 

  -> c 드라이브의 가 폴더안에 나 폴더 안에 다 폴더 안에 로그파일이 생성 됨 

- project_name 에 값을 "라" 로 설정시

  -> 로그파일의 이름이 "라" 로 설정됨  ex) 라.log

 

application.yml ( 본래 파일명 application.properties )

- database 설정

   datasource 에 jdbc 주소를 넣음

  driver-class-name 에 드라이버 주소를 넣음

  username과 password 설정 

- server port 와 context-path 설정 => http://localhost:8888/kkkk

  server:

          port : 8888

          servlet:

                  context-path : /kkkk

ex)

server:
  port: 8888
  servlet:
    session:
      timeout: 6000s      
    context-path: /kkkk
  error:
    whitelabel:
      enabled: false
    include-stacktrace: always

 

+ dependency 추가 

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-devtools</artifactId>
	<scope>runtime</scope>
	<optional>true</optional>
</dependency>
728x90

댓글