1. request.getRequestURI() -> /distributor/checkCaseName/123123
    2. request.getRequestURL() -> http://localhost:8080/distributor/checkCaseName/123123
    3. request.getServletContext().getRealPath("/") ->
    4. /Users/tonnyyi/workspace/CT/simulate-partner/simulate-distributor/target/simulate-distributor-1.0/
    5. request.getServletContext().getRealPath(request.getRequestURI()) ->
    6. /Users/tonnyyi/workspace/CT/simulate-partner/simulate-distributor/target/simulate-distributor-1.0/distributor/checkCaseName/123123
    7. request.getServletPath() -> /checkCaseName/123123
    8. request.getSession().getServletContext().getRealPath("/") ->
    9. /Users/tonnyyi/workspace/CT/simulate-partner/simulate-distributor/target/simulate-distributor-1.0/
    10. Thread.currentThread().getContextClassLoader().getResource("") ->
    11. file:/Users/tonnyyi/workspace/CT/simulate-partner/simulate-distributor/target/simulate-distributor-1.0/WEB-INF/classes/
    12. DispatcherServlet.class.getClassLoader().getResource("") ->
    13. file:/Users/tonnyyi/workspace/CT/simulate-partner/simulate-distributor/target/simulate-distributor-1.0/WEB-INF/classes/
    14. DispatcherServlet.class.getResource("") ->
    15. jar:file:/Users/tonnyyi/workspace/CT/simulate-partner/simulate-distributor/target/simulate-distributor-1.0/WEB-INF/lib/spring-webmvc-4.2.3.RELEASE.jar!/org/springframework/web/servlet/
    16. DispatcherServlet.class.getResource("/") ->
    17. file:/Users/tonnyyi/workspace/CT/simulate-partner/simulate-distributor/target/simulate-distributor-1.0/WEB-INF/classes/
    18. new File("/").getAbsolutePath() -> /
    19. System.getProperty("user.dir") -> /Applications/apache-tomcat-8.0.26/bin
    20. # 摘自spring boot org.springframework.boot.loader.Launcher#createArchive
    21. CodeSource codeSource = getClass().getProtectionDomain().getCodeSource();
    22. URI location = (codeSource != null) ? codeSource.getLocation().toURI() : null;
    23. String path = (location != null) ? location.getSchemeSpecificPart() : null;
    24. System.out.println(path);