File tree 2 files changed +7
-3
lines changed
src/main/java/ru/mystamps/web
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 20
20
import java .util .HashMap ;
21
21
import java .util .Map ;
22
22
23
+ import org .springframework .core .env .Environment ;
24
+
23
25
/**
24
26
* Holds path to site and all URLs.
25
27
*
@@ -123,7 +125,9 @@ public final class Url {
123
125
private Url () {
124
126
}
125
127
126
- public static Map <String , String > asMap (boolean serveContentFromSingleHost ) {
128
+ public static Map <String , String > asMap (boolean production ) {
129
+ boolean serveContentFromSingleHost = !production ;
130
+
127
131
// Not all URLs are listed here but only those that are being used on views
128
132
Map <String , String > map = new HashMap <>();
129
133
map .put ("PUBLIC_URL" , PUBLIC_URL );
Original file line number Diff line number Diff line change @@ -62,8 +62,8 @@ public void afterPropertiesSet() throws Exception {
62
62
return ;
63
63
}
64
64
65
- boolean useSingleHost = ! environment .acceptsProfiles ("prod" );
66
- viewResolver .setStaticVariables (Url .asMap (useSingleHost ));
65
+ boolean productionEnv = environment .acceptsProfiles ("prod" );
66
+ viewResolver .setStaticVariables (Url .asMap (productionEnv ));
67
67
}
68
68
69
69
}
You can’t perform that action at this time.
0 commit comments