对于windows环境,最简单的方式是下载一个installer,双击运行就可以了。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>My Blog</title> | |
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.css"> | |
</head> | |
<body> | |
<div class="container"> |
Spring MVC其实提供了一些好用的util类:
import org.springframework.web.util.WebUtils;
Cookie cookie = WebUtils.getCookie(request, "SECURITY_TOKEN");
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 1; | |
error_log logs/error.log; | |
pid logs/nginx.pid; | |
events { | |
# use epoll; | |
worker_connections 1024; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Repository | |
public class ApiDao extends SqlMapClientDaoSupport { | |
// empty constructor | |
public ApiDao() { | |
} | |
// autowired constructor | |
// i dont know why, but i cant autowired sqlMapClient directly | |
// it will cause java.lang.IllegalArgumentException: Property 'sqlMapClient' is required |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.arganzheng.study.metadata.dao; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.Reader; | |
import java.util.List; | |
import javax.xml.bind.JAXBContext; |
log4j.logger.java.sql.PreparedStatement=debug
log4j.logger.java.sql.Connection=debug
将打印出Connection和Statement信息:
[DEBUG] 11:48:17 Connection - {conn-100000} Connection
[DEBUG] 11:48:17 Connection - {conn-100000} Preparing Statement: select api.id from t_api_metadata_api api, t_api_metadata_module module where api.module_id=module.id and api.source = ? and api.name = ? and api.module_id = ? and module.name = ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.arganzheng.study; | |
import java.io.IOException; | |
import java.io.PrintStream; | |
import org.codehaus.jackson.map.ObjectMapper; | |
import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion; | |
import org.springframework.http.HttpOutputMessage; | |
import org.springframework.http.converter.HttpMessageNotWritableException; | |
import org.springframework.http.converter.json.MappingJacksonHttpMessageConverter; |