Notice
														
												
											
												
												
													Link
													
											
												
												- Today
- Total
													Recent Posts
													
											
												
												
													Recent Comments
													
											
									| 일 | 월 | 화 | 수 | 목 | 금 | 토 | 
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 | 
| 12 | 13 | 14 | 15 | 16 | 17 | 18 | 
| 19 | 20 | 21 | 22 | 23 | 24 | 25 | 
| 26 | 27 | 28 | 29 | 30 | 31 | 
													Tags
													
											
												
												- springboot
- MFC
- 터치좌표 view
- Activity 전체화면
- 파티션 빠른 삭제
- pid 찾아 kill
- 말줌임 CSS
- 시간대별 통계
- view 획득
- vc++
- Back 키 클릭 감지
- CSS
- CentOS
- sql exception
- ffmpeg
- kill -9
- 스크롤적용
- rn
- mybatis exception
- springboot 재가동
- SQL
- reactnative
- c언어
- MariaDB
- 피쉬랜드
- 가변영역 스크롤
- 코드로 서버 재실행
- MySQL
- 시간대 테이블생성
- group by
													Archives
													
											
									개발은 하는건가..
[springboot] application.properties 프로파일별로 따로두기 본문
반응형
    
    
    
  개발모드와 상용 모드에 따라 DB 주소, 파일 업로드 경로와 같이 다르게 설정되어야 할 경우  application.properties 를 
구분해야 할 경우 다음과 같이 application.properties  에는 공통 속성만 정의하고 개발과 상용 application.properties 구분하여 관리한다.
# application.properties 파일.
# Profile (dev=development build, prod=product build)
spring.profiles.active=dev
# !! Version is automatically updated by gradle.
info.build.version=1.0.0
# Common properties
server.port=16300
server.datapacket.port=16301spring.profiles.active 의 값에 따라 빌드 시 그에 해당하는 application.properties 가 빌드된다.
위처럼 모드를 dev , prod 로 구분했을 경우
dev 용은  application-dev.properties 로 파일을 생성하고 prod 용은 application-prod.properties 로 파일을 생성하여
해당 파일안에 모드에 따른 속성들을 각각 정의한다.
'SpringBoot , Thymeleaf' 카테고리의 다른 글
| [lo4j2] 로그 파일로 생성되게 하기 (2) | 2023.06.09 | 
|---|---|
| mybatis DTO 클래스 aliasesPackage 지정 (0) | 2023.05.25 | 
| [Springboot] jar 파일을 exe 파일로 만들기 (0) | 2023.02.13 | 
| [Springboot] 파일 다운로드 (0) | 2023.01.30 | 
| [Springboot] 파일 업로드 (0) | 2023.01.30 | 
			  Comments
			
		
	
               
           
					
					
					
					
					
					
				