RESTful 学习笔记

  1. REST: Representational State Transfer, 我喜欢译为 "可表示的状态的传输", "可描述的状态的传输". 表示的, 或者描述的是背后的资源/资产 (Resoure). 状态是 Resource 的状态 (期望的状态或当前的状态).
  2. RESTful 是一种 Style, 不是一个规范;
  3. 有几个特别熟悉的词要熟悉一下它原来的含义
    Uniform Resource Identifier (URI)
    HyperText Transfer Protocol (HTTP)
    HyperText Mark-up Language (HTML)
  4. Hypermedia as the engine of application state (HATEOAS);

Maven 完全参考 学习笔记 (3) Project Object Model - Project Dependencies

  1. There are 4.5 types of dependence scope. compile(default), test[junit], provided[servlet], runtime[mysql-jdbc], system;
  2. you can define: Optional Dependencies. subproject or depends project will choose dependence;
  3. Version Ranges: (, ), [, ], [3.8,4.0), [,3.8.1], etc;
  4. 传递性依赖 和 冲突解析;
  5. Project relationship: depends, parent-child, project-subModule;
  6. Child POM inherits from its parent POM:
    identifiers (at least one of groupId or artifactId must be overridden.)
    developers and contributors
    plugin lists
    reports lists
    plugin executions (executions with matching ids are merged)
    plugin configuration
  7. Maven assumes that the parent POM is available from the local repository, or available in the parent directory (../pom.xml) of the current project. Or you can use relativePath to customize: <relativePath>../a-parent/pom.xml</relativePath>
  8. Best Practices:
    Grouping Dependencies
    Multi-module vs. Inheritance

Maven 完全参考 学习笔记 (3) Project Object Model - 1

在线书 Project Object Model

  1. POM: things and actions. things in pom.xml and actions in your command and life cyle (phase, goal);
  2. The POM is also not specific to building Java projects;
  3. The POM contains four categories of description and configuration
    The Four Categories of POM
  4. The Super POM: All Maven project POMs extend the Super POM, which defines a set of defaults shared by all projects. This Super POM is a part of the Maven installation. it is in in ${M2_HOME}/lib/maven_*.jar;
  5. The Super POM defines some standard configuration variables that are inherited by all projects. Like central repo, plugin repo, folder structures, etc;
  6. The Effective POM: merge between the Super POM and your pom:$ mvn help:effective-pom;
  7. Project version: <major version>.<minor version>.<incremental version>-<qualifier>;
  8. Keeping your version numbers aligned with this standard will become very important when you want to start using version ranges in your POMs. or it will use String comparison;
  9. The qualifier exists to capture milestone builds: alpha and beta releases;
  10. Use "alpha-02" as qualifier, not "alpha-2", when you have "alpha-10";
  11. SNAPSHOT versions are used for projects under active development.
  12. Property References: preceded by a dollar sign and surrounded by two curly braces. ex: ${project.groupId}. could be: env, project, settings;