启动 Spring Boot 运行项目并测试结果。打开终端,进入到项目目录下(pom.xml文件所在目录),执行以下命令 -
F:\worksp\springboot\ajax-example> mvn spring-boot:run ... ... 02:57:41,425 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT] 02:57:41,425 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration. 02:57:41,425 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@7cf10a6f - Registering current configuration as safe fallback point . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ ::Spring Boot:: (v1.5.1.RELEASE) 2017-03-28 02:57:42 INFO com.yiibai.SpringBootWebApplication - Starting SpringBootWebApplication on MY-PC with PID 7656 (F:\worksp\springboot\ajax-example\target\classes started by Administrator in F:\worksp\springboot\ajax-example) 2017-03-28 02:57:42 DEBUG com.yiibai.SpringBootWebApplication - Running with Spring Boot v1.5.1.RELEASE, Spring v4.3.6.RELEASE 2017-03-28 02:57:42 INFO com.yiibai.SpringBootWebApplication - No active profile set, falling back to default profiles: default 2017-03-28 02:57:46 INFO com.yiibai.SpringBootWebApplication - Started SpringBootWebApplication in 5.007 seconds (JVM running for 6.084)打开浏览器,访问以下地址::8080/ , 应该会看到如下页面 -
如果没有输入用户名,直接点击“搜索”,那么应该会看到以下结果 -
如果输入一个存在的用户名:maxsu,直接点击“搜索”,那么应该会看到以下结果 -
要下载代码,请参考下载页面。
本站代码下载:
本文属作者原创,转载请注明出处:易百教程