You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by GitBox <gi...@apache.org> on 2021/05/18 00:37:25 UTC

[GitHub] [shiro-site] weltonrodrigo opened a new pull request #82: Patch 2

weltonrodrigo opened a new pull request #82:
URL: https://github.com/apache/shiro-site/pull/82


   This is a very useful feature for the docker world, but couldn't find any information about it in the docs.
   
   Also, please note that the footer link "Edit this Page on Github" is pointing to branch `master` instead of the new `main`, this results in a 404 error.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shiro-site] weltonrodrigo commented on pull request #82: Variable interpolation section on configuration doc

Posted by GitBox <gi...@apache.org>.
weltonrodrigo commented on pull request #82:
URL: https://github.com/apache/shiro-site/pull/82#issuecomment-843144004


   > @weltonrodrigo thanks a lot for your PR!
   > I think you could squash the commits, they are short enough.
   
   Done.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shiro-site] bdemers commented on a change in pull request #82: Variable interpolation section on configuration doc

Posted by GitBox <gi...@apache.org>.
bdemers commented on a change in pull request #82:
URL: https://github.com/apache/shiro-site/pull/82#discussion_r634409994



##########
File path: configuration.md.vtl
##########
@@ -342,6 +343,26 @@ anObject.map = $objectKey1:$objectValue1, $objectKey2:$objectValue2
 ...
 ```
 
+<a name="Configuration-VariableInterpolation"></a>
+#[[######Variable Interpolation]]#
+
+You can use variable interpolation when defining values. Supported types are environment variables, system properties and constants.
+
+For constants, use `${const:CONSTANT_NAME}`, for environment variables and system properties, use `${ENV_VARIABLE_NAME}` or ${`PROPERTY`}.

Review comment:
       ```suggestion
   For constants, use `${const:com.example.YourClass.CONSTANT_NAME}`, for environment variables and system properties, use `${ENV_VARIABLE_NAME}` or `${system.property}`.
   ```
   
   Use fully qualified name for const example, and lower case for system properties, as that is _normally_ the convention
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shiro-site] bdemers commented on pull request #82: Variable interpolation section on configuration doc

Posted by GitBox <gi...@apache.org>.
bdemers commented on pull request #82:
URL: https://github.com/apache/shiro-site/pull/82#issuecomment-843198076


   Thanks @weltonrodrigo !!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shiro-site] bdemers commented on a change in pull request #82: Variable interpolation section on configuration doc

Posted by GitBox <gi...@apache.org>.
bdemers commented on a change in pull request #82:
URL: https://github.com/apache/shiro-site/pull/82#discussion_r634410258



##########
File path: configuration.md.vtl
##########
@@ -342,6 +343,26 @@ anObject.map = $objectKey1:$objectValue1, $objectKey2:$objectValue2
 ...
 ```
 
+<a name="Configuration-VariableInterpolation"></a>
+#[[######Variable Interpolation]]#
+
+You can use variable interpolation when defining values. Supported types are environment variables, system properties and constants.
+
+For constants, use `${const:CONSTANT_NAME}`, for environment variables and system properties, use `${ENV_VARIABLE_NAME}` or ${`PROPERTY`}.
+
+System properties and environment variables are lookup up in that order.
+
+Default values are supported in the form `${const:CONSTANT_NAME:-default_value`}, or `${VARIABLE_NAME:-default_value}`, as in:

Review comment:
       ```suggestion
   Default values are supported in the form `${const:com.example.YourClass.CONSTANT_NAME:-default_value`}, or `${VARIABLE_NAME:-default_value}`, as in:
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shiro-site] bdemers commented on a change in pull request #82: Variable interpolation section on configuration doc

Posted by GitBox <gi...@apache.org>.
bdemers commented on a change in pull request #82:
URL: https://github.com/apache/shiro-site/pull/82#discussion_r634411809



##########
File path: configuration.md.vtl
##########
@@ -342,6 +343,26 @@ anObject.map = $objectKey1:$objectValue1, $objectKey2:$objectValue2
 ...
 ```
 
+<a name="Configuration-VariableInterpolation"></a>
+#[[######Variable Interpolation]]#
+
+You can use variable interpolation when defining values. Supported types are environment variables, system properties and constants.
+
+For constants, use `${const:CONSTANT_NAME}`, for environment variables and system properties, use `${ENV_VARIABLE_NAME}` or ${`PROPERTY`}.
+
+System properties and environment variables are lookup up in that order.
+
+Default values are supported in the form `${const:CONSTANT_NAME:-default_value`}, or `${VARIABLE_NAME:-default_value}`, as in:
+
+``` ini
+myRealm.connectionTimeout = ${REALM_CONNECTION_TIMEOUT:-3000}
+```
+
+Which will be interpreted as `myRealm.connectionTimeout = 3000` if no system property or environment variable `REALM_CONNECTION_TIMEOUT` is defined.
+
+If no variable is found, the whole definition is passed on.

Review comment:
       ```suggestion
   If no replacement is found, the definition will remain unchanged.
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shiro-site] weltonrodrigo commented on pull request #82: Variable interpolation section on configuration doc

Posted by GitBox <gi...@apache.org>.
weltonrodrigo commented on pull request #82:
URL: https://github.com/apache/shiro-site/pull/82#issuecomment-843329683


   Accepted changes and squashed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shiro-site] bmarwell commented on pull request #82: Variable interpolation section on configuration doc

Posted by GitBox <gi...@apache.org>.
bmarwell commented on pull request #82:
URL: https://github.com/apache/shiro-site/pull/82#issuecomment-842871696


   @weltonrodrigo thanks a lot for your PR! 
   I think you could squash the commits, they are short enough.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shiro-site] bdemers commented on pull request #82: Variable interpolation section on configuration doc

Posted by GitBox <gi...@apache.org>.
bdemers commented on pull request #82:
URL: https://github.com/apache/shiro-site/pull/82#issuecomment-843202742


   Also, we have an update for the `master` to `main` issue you noticed in the Edit link, you caught us mid migration 😄 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shiro-site] fpapon merged pull request #82: Variable interpolation section on configuration doc

Posted by GitBox <gi...@apache.org>.
fpapon merged pull request #82:
URL: https://github.com/apache/shiro-site/pull/82


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org