工作易忽略汇总

1.Intellij idea的使用

  1)目前最常用快捷键(设为eclipse风格后的):

   CTRL+ALT+L 格式化代码

   CTRL+SHIFT+P 跳到花括号、括号、中括号的对应端

   SHIFT+ENTER 从当前行的任意位置开始下一行

   CTRL+ALT+ENTER 从当前行的任意位置开始上一行

  2)如何配置项目工程(File --> Project structure)

2. maven文件配置

  1)如何配置多个源代码文件目录,如何配置多个资源文件目录

  2)使用maven插件时,当前pom是否为主模块配置文件,那么plugins标签外是否应加入pluginsmanagement标签(一个坑,需要关注)

3.web.xml文件配置,包括了解 context-param --> listener --> filter --> servlet 的加载顺序,session的失效时间,欢迎界面和Error界面的配置

4.applicationContext.xml、spring-mvc.xml、spring-shiro.xml等文件配置

  其中拦截器和webSocket的配置应放到spring-mvc.xml中

  还有需要注意一个是context:component-scan的配置问题,主要是use-default-filters的用法,默认为true,自动扫描并管理配置的包及子包下标记为@Component,@Service,@Repository的bean

  如果配置为false,就只加载(include-fliter)或排除(exclude-filter)配置的注解了,applicationContext.xml最优的配置:

<context:component-scan base-package="com.kthw.tsip">
        <!-- 扫描符合@Service @Repository的类 -->
        <context:exclude-filter type="annotation"
            expression="org.springframework.stereotype.Controller" />
</context:component-scan>

  在spring-mvc.xml中在加载Controller的配置

<context:component-scan base-package="com.kthw.tsip.controller" use-default-filters="false">
        <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>

5.前端bootstrap中导航条样式修改整理出的css文件链接,配合bootstrap可方便修改为自定义的颜色:

   https://github.com/wangbo7753/TSIP/blob/master/web/css/skin.css

posted @ 2017-11-01 19:14  总结  阅读(109)  评论(0编辑  收藏  举报