package com.smart.shop;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 微服务应用入口
 * @author lijinfeng
 * @time 2016-02-25 16:32
 * @remark 应用访问入口
 * 1. @RestController 
 * 2. @Controller 模板下使用
 */
@Controller
@EnableAutoConfiguration
public class Application {
	/**
	 * 首页
	 * @return
	 */
    @RequestMapping("/")
    String index() {
        return "index";
    }
    
    /**
     * 登录页面
     * @return
     */
    @RequestMapping("/login")
    public String login() {
        return "Hello World!";
    }
    
    /**
     * 退出页面
     * @return
     */
    @RequestMapping("/logout")
    public String logout() {
        return "Hello World!";
    }
    
    /**
     * 主函数
     * @param args
     * @throws Exception
     */
    @SuppressWarnings("deprecation")
	public static void main(String[] args) throws Exception {
        //SpringApplication.run(Application.class, args);
        SpringApplication app = new SpringApplication(Application.class);
        app.setShowBanner(false);
        app.run(args);
    }

}
@@ -136,24 +136,85 @@
 figuration;%0A
+import org.springframework.context.annotation.ComponentScan;%0A
 import org.s
@@ -417,16 +417,29 @@
 troller 
+microservice 
 %0A * 2. @
@@ -453,16 +453,20 @@
 ler 
+html
 %E6%A8%A1%E6%9D%BF%E4%B8%8B%E4%BD%BF%E7%94%A8%0A *
 /%0A@C
@@ -465,21 +465,67 @@
 %E7%94%A8%0A *
-/%0A@Controller
+ 3. @ComponentScan %E6%89%AB%E6%8F%8F%E6%89%80%E6%9C%89%E7%9A%84%E6%B3%A8%E8%A7%A3%E7%BB%84%E4%BB%B6%0A */%0A@Controller%0A@ComponentScan
 %0A@En

add @ComponentScan in Application.java