You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alternatively, you can disable environment deduction using the api:context.ApplicationContextBuilder[]'s `deduceEnvironment` method when setting up your application.
47
47
48
48
snippet::io.micronaut.docs.context.env.DefaultEnvironmentSpec[tags="disableEnvDeduction",indent=0,title="Using ApplicationContextBuilder to disable environment deduction"]
49
+
50
+
== Default Environment
51
+
52
+
Micronaut supports the concept of one or many default environments. A default environment is one that is only applied if no other environments are explicitly specified. Environments can be explicitly specified either through the application context builder `Micronaut.build().environments(...)`, through the `micronaut.environments` system property, or the `MICRONAUT_ENVIRONMENTS` environment variable. If an environment is configured through any of the above means, the default environment will *not* be applied.
53
+
54
+
To set the default environments, modify your application main method:
Copy file name to clipboardexpand all lines: src/main/docs/guide/introduction/whatsNew.adoc
+4
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,10 @@ Query parameters are now respected and bindable in the Micronaut websocket suppo
22
22
23
23
Cookies in HTTP responses from the client side are now retrievable on the HttpResponse. These are the cookies found in the `Set-Cookie` header.
24
24
25
+
==== Default Environment
26
+
27
+
Micronaut 2.1 introduces the concept of a default environment. One or more default environments can be set and they will apply if no other environments are explicitly specified. See the <<environments, environments documentation>> for information on how to use this new feature.
28
+
25
29
==== Mandatory upgrade for Netty tcnative
26
30
27
31
Due to a new https://github.com/netty/netty/pull/10407[SSL default value introduced in Netty 4.1.52], if you are using tcnative you need to update it to `2.0.33.Final`.
0 commit comments