- 在sublime-text中通过
preferences->Browse Packages...
打开package目录 - 新建一个目录
CoffeeScript
,在目录下新建文件CoffeeScript.tmLanguage
,内容来自:https://github.com/jashkenas/coffee-script-tmbundle/blob/master/Syntaxes/CoffeeScript.tmLanguage
application/x-www-form-urlencoded
application/x-www-form-urlencoded
application/json; charset=UTF-8
A clear explanation from Daniel Irvine:
401 Unauthorized, the HTTP status code for authentication errors. And that’s just it: it’s for authentication, not authorization. Receiving a 401 response is the server telling you, “you aren’t authenticated–either not authenticated at all or authenticated incorrectly–but please reauthenticate and try again.” To help you out, it will always include a WWW-Authenticate header that describes how to authenticate.
This is a response generally returned by your web server, not your web application.
It’s also something very temporary; the server is asking you to try again.
So, for authorization I use the 403 Forbidden response. It’s permanent, it’s tied to my application logic, and it’s a more concrete response than a 401.
<authentication-manager> | |
<authentication-provider> | |
<user-service> | |
<user name="sa" password="sa" authorities="ROLE_USER,ROLE_ADMIN,ROLE_UC_ADMIN" /> | |
</user-service> | |
</authentication-provider> | |
</authentication-manager> |
<!-- 加上URIEncoding解决GET请求的中文问题 --> | |
<Connector port="8080" protocol="HTTP/1.1" | |
connectionTimeout="20000" | |
redirectPort="8443" URIEncoding="UTF-8" | |
/> |
private boolean tableExistsInDb(String tableName){ | |
Connection conn = null; | |
ResultSet tabs = null; | |
try { | |
conn = jdbcTemplate.getDataSource().getConnection(); | |
DatabaseMetaData dbMetaData = conn.getMetaData(); | |
String[] types = { "TABLE" }; | |
tabs = dbMetaData.getTables(null, null, tableName, types); | |
if (tabs.next()) { | |
return true; |
println new File("/tmp").list({d, f-> f ==~ /.*.txt/ } as FilenameFilter) |
http://subclipse.tigris.org/svnant.html
把lib目录下的jar文件拷贝到{GROOVY_HOME}/lib目录下
Once your doGet method ends, the response is complete and sent back to the client. Your thread may or may not still be running, but it can't change the response any longer. | |
What the new async feature in Servlet 3.0 does, is that it allows you to free the request thread for processing another request. What happens is the following: | |
RequestThread: |-- doGet() { startAsync() } // Thread free to do something else | |
WorkerThread: |-- do heavy processing --| | |
OtherThread: |-- send response --| | |
The important thing is that once RequestThread has started asynchronous processing via a call to startAsync(...), it is free to do something else. It can accept new requests, for example. This improves throughput. |
StringBuilder msg = new StringBuilder(); | |
msg.append("Could not refresh JMS Connection for destination '"); | |
msg.append(getDestinationDescription()).append("' - retrying in "); | |
msg.append(this.recoveryInterval).append(" ms. Cause: "); | |
msg.append(ex instanceof JMSException ? JmsUtils.buildExceptionMessage((JMSException) ex) : ex.getMessage()); | |
if (logger.isDebugEnabled()) { | |
logger.error(msg, ex); | |
} | |
else { | |
logger.error(msg); |