0%

web.xml

error page

1
2
3
4
<error-page>
<error-code>404</error-code>
<location>/WEB-INF/jsp/errors/error.jsp</location>
</error-page>
1
2
3
4
5
6
7
8
9
10
11
@Bean
public ServerProperties serverProperties () {
return new ServerProperties() {
@Override
public void customize(ConfigurableEmbeddedServletContainer container) {
super.customize(container);
container.addErrorPages(new ErrorPage(HttpStatus.NOT_FOUND, "/error/404"));
}
};
}

spring-context.xml

1
2
3
4
5
@ImportResource("classpath:spring-context.xml")
@EnableAdminServer
public class WebApplication extends SpringBootServletInitializer {
...
}

log back upgrade

1
2
3
4
5
<!-- change include to included for file that will be included, like this: -->
<!-- http://logback.qos.ch/manual/configuration.html -->
<included>
...
</included>

当子元素是浮动布局时,父元素无法获取到正确的宽高,这种情况常常使用clearfix方案来解决。

** 示例如下:**

1
2
3
<div> <!-- 父元素无法获取到正确的尺寸 -->
<div style="float:left; width:100px; height:100px;"></div>
</div>
阅读全文 »

Original:

1
2
3
4
5
6
7
8
9
10
11
.a {
&.a-b {
&:hover {
background-color: #5cb85c;
}
}
}

.a-c {
&:extend(.a .a-b:hover);
}
阅读全文 »

配置文件

继承和聚合

属性

内置、POM属性、自定义属性、settings属性、Java系统属性、环境变量

  • finalName: 配置最终生成的war包的文件名,可以用于替换默认的project.artifactId{project.artifactId}-{project.version},便于发布的时候生成合适的路径

生命周期

三套独立生命周期

阅读全文 »

结构组织

1
2
3
4
5
css
|-[业务类文件夹]
|-[通用类-样式重置].css
|-[通用类-公用组件].css
|-[通用类-ie兼容].css

css样式排序

阅读全文 »

用markdown来写博客简直不要太爽!

有了这种黑客技,不得不说很激发写博客的热情,试试看吧!

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

昨晚老婆在家玩游戏,遇到一个关卡,挺有意思,找不到图了,姑且文字描述一下。

  • 游戏模型:[1, 1, 1, 0, -1, -1, -1]
  • 规则:1或-1可以移动到其旁边0的位置,或者移动到间隔一个障碍的下一个0的位置;1只能向右移动,-1只能向左移动
  • 目标:所有-1移动到左边,1移动到右边,即最后状态为[-1, -1, -1, 0, 1, 1, 1]
阅读全文 »