1、创建一个Spring Initializr项目(右键->Spring Starter Project) 2、在application.properties应用属性配置文件中可直接修改端口号(因为tomcat是内嵌在SpringBoot之中的) 3、在SpringBoot应用类的包下面创建Controller应用(注意一定要在应用类对应包下,否则扫描器无法扫描到你的类) 4、启动并通过路径访问资源