# 25.2 프로그램적으로 프로파일 세팅

&#x20;`SpringApplication.setAdditionalProfiles(…​)`응용 프로그램을 실행하기 전에 호출 하여 활성 프로파일을 프로그래밍 방식으로 설정할 수 있습니다 . Spring의 `ConfigurableEnvironment`인터페이스 를 사용하여 프로필을 활성화 할 수도 있습니다 .

{% hint style="info" %}
**setAdditionalProfiles**

```
public void setAdditionalProfiles(String... profiles)
```

Set additional profile values to use (on top of those set in system or command line properties).Parameters:`profiles` - the additional profiles to set

참조 : API 문서

인자를 위의 예제로 치면 dev를 입력하면 되는 듯
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wannaqueen.gitbook.io/spring5/spring-boot/undefined-1/25.-by-ks-1/25.2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
