• 编写Application类

    编写TodoServiceApplication类

    package com.hand.hap.cloud.todo.demo;
    
    import org.springframework.boot.SpringApplication;
    import org.springframework.boot.autoconfigure.SpringBootApplication;
    import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
    
    /**
    * Created by ziling.zhong on 2017/7/5.
    */
    
    @EnableEurekaClient
    @SpringBootApplication
    public class TodoServiceApplication {
        public static void main(String[] args) {
            SpringApplication.run(TodoServiceApplication.class, args);
        }
    }
    

    结构图