Config maven to use socks proxy
This is not listed on maven official documents, I took several days to find a solution:
Create below environment viarible
set MAVEN_OPTS=-DsocksProxyHost=yourSocksProxyHost -DsocksProxyPort=yourSocksProxyPort
Add custom spring securtiy expression method
There are no offcial ways to add custom security expression, like hasRole / hasAuthority etc, the only way is to do some tweaking.
Solution 1. Create a static method and invoke by spel. Like below:
<security:authorize access="T(com.Class).doSomething(request.parameterMap['parameterName'], 'ROLE_ADMIN')">
python, xpath and ElementTree
Failed to find a xpath solution in python2.6 standard library. Seems like ElementTree is the only API have limited xpath support. But...
http://effbot.org/zone/element-xpath.htm
http://codespeak.net/pipermail/lxml-dev/2006-May/001294.html
And for my test code:
deps = tree.findall("//dependency[@testP='testV']")
print deps
Error:
SyntaxError: expected path separator ([)
Also Find:
phpmyadmin, nginx, ssl and https
Several problems resolved:
1. Jump to http 80 after login, not https.
2. Jump to https://test.com/index.php, not https://test.com/phpmyadmin/index.php after login.
3. Static content location.
Below is my sample configuration: