Mac下安装GNU工具集

安装 Homebrew ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 修改 .bashrc 或者 .zshrc 添加以下内容 export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH" 安装 GNU Core Command Line

Mybatis代码片段

批处理 <select id="getAdsByGroupIds" resultMap="adInfoWithGroupId"> SELECT ai.*, gam.group_id FROM group_ad_mapping AS gam LEFT JOIN ad_info AS ai ON gam.creative_id = ai.creative_id WHERE gam.group_id in <foreach collection="list" item="item" index="index" separator=","

SpringMVC单元测试controller

import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpSession; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; import static

Git自动化部署项目

操作步骤 创建一个裸仓库 mkdir /home/sky/auto/git cd /home/sky/auto/git git init --bare . 添加一个git勾子(就

Maven配置远程仓库

<mirror> <id>repo2</id> <mirrorOf>*</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://repo2.maven.org/maven2/</url> </mirror> <mirror> <id>aliyun</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> </mirror> 配置成阿里云的服