zoukankan      html  css  js  c++  java
  • Hello World Spring MVC

    1, Setup Development Environment

    1.1, Java SDK

    | ~ @ yvan-mac (yvan) 
    | => java -version
    java version "1.7.0_79"
    Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
    Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
    

    1.2, $JAVA_HOME

    | => echo $JAVA_HOME
    /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
    

    Set $JAVA_HOME environment variable on Mac OS X(Mac OSX 10.5 or later)

    $ vim .bash_profile
    export JAVA_HOME=$(/usr/libexec/java_home)
    $ source .bash_profile

    
    ###1.3, Install Spring Tool Suite
    Download [Spring Tool Suite](https://spring.io/tools/sts), and install it.
    
    #2, Create a [Spring MVC project](https://spring.io/guides/gs/serving-web-content/) by Spring Starter Project
    
    Click "Import Spring Getting Started Content"
    ![Import Spring Getting Started Content](http://images2015.cnblogs.com/blog/26318/201605/26318-20160508170548187-1955001990.png)
    
    Select "Serving Web Content" template
    ![Serving Web Content](http://images2015.cnblogs.com/blog/26318/201605/26318-20160508170634874-1841609883.png)
    
    Select Install JRE to fix project error
    ![Install JRE](http://images2015.cnblogs.com/blog/26318/201605/26318-20160508171010671-863639071.jpg)
    
    Launch web site
    ![Run as Spring Boot App](http://images2015.cnblogs.com/blog/26318/201605/26318-20160508172300405-540716036.png)
    
    ![Launch web site](http://images2015.cnblogs.com/blog/26318/201605/26318-20160508171101734-153379520.png)
    
    
    
    Resource: [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
  • 相关阅读:
    java中BigDecimal的四舍五入小记
    thinking in java学习笔记:14章 类型信息
    java中==和equals
    java中值传递和引用传递
    java中的赋值
    hessian学习笔记
    springboot学习笔记:12.解决springboot打成可执行jar在linux上启动慢的问题
    要是满足下面的其中3种情况,你就跑路吧
    vim程序编辑器---常用操作整理
    报错end Kernel panic
  • 原文地址:https://www.cnblogs.com/joe-yang/p/5470960.html
Copyright © 2011-2022 走看看