[JBoss & Wildfly] System property 세팅 및 사용
standalone.xml 파일을 열어서 다음과 같이 수정해준다.
<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:4.2">
<extensions>
...
</extensions>
<!-- 시스템 프로퍼티 추가-->
<system-properties>
<property name="server.type" value="dev"/>
</system-properties>
...
</server>
WAS를 기동시 키고 java단에서 System.getProperty("server.type") 함수를 사용하면 "dev" 값이 나온다.
https://kb.novaordis.com/index.php/WildFly_System_Properties#Standard_System_Properties
WildFly System Properties - NovaOrdis Knowledge Base
Internal Overview System properties can be declared in the server's configuration files and are propagated to the server JVMs and implicitly to applications. For more details on how system property can be declared, see Declaration in Configuration Files be
kb.novaordis.com
'Server & Infra' 카테고리의 다른 글
[Docker] yum 명령어를 통한 Docker 설치방법 (Cloud 환경) (0) | 2022.03.11 |
---|---|
[Linux / CentOS 7] vmware 리눅스 하드디스크 마운트 및 폴더 용량 확장 (3) | 2021.11.08 |
[Linux / CentOS] vmware 내에 CentOS 7 수동 네트워크 설정 및 고정IP 할당 (0) | 2021.11.02 |
[Linux / CentOS] Hostname 바꾸기 (0) | 2021.10.27 |
[Linux / Cent OS] Alias 설정으로 편하게 로그보기 (1) | 2021.01.25 |