Change Active Profiles Spring at runtime

Asked

Viewed 109 times

2

I usually use this code snippet to define the profile of the application

<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
    <param-name>spring.profiles.active</param-name>
    <param-value>production</param-value>
</init-param>
</servlet>

Is there any way to do this at runtime through a controller ?

1 answer

1

  • I’ll do and test and come back here to tell. VLW

Browser other questions tagged

You are not signed in. Login or sign up in order to post.