摘要:
pom.xml org.springframework.boot spring-boot-starter-jdbc App类package com.smartmap.sample.ch1;import org.springframework.boot.SpringApplication;import org.springframework.... 阅读全文
摘要:
package com.sample.smartmap.controller;import java.util.List;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.http.MediaType;import org.springframework.stereoty... 阅读全文
摘要:
package com.sample.smartmap.controller;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.http.MediaType;import org.springframework.stereotype.Controller;import o... 阅读全文
摘要:
package com.sample.smartmap.controller;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;import org.springframework.ui.Model;import org.spr... 阅读全文
摘要:
package com.sample.smartmap.controller;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.Get... 阅读全文
摘要:
package com.sample.smartmap.controller;import java.io.IOException;import java.math.BigDecimal;import java.util.Date;import java.util.HashMap;import java.util.Map;import org.apache.commons.logging.Log;... 阅读全文
摘要:
方法1@Value("${test.msg}") private String msg;方法2@Autowired private Environment env;String value = env.getProperty("test.msg");方法3@RequestMapping(path="/${query.all}.json", method=RequestMethod.GE... 阅读全文
摘要:
Spring Boot建议使用这些模板引擎,避免使用JSP,若一定要使用JSP将无法实现Spring Boot的多种特性pom.xml org.springframework.boot spring-boot-starter-thymeleaf application.propertiesspring.thymeleaf.cache=tru... 阅读全文
摘要:
package com.smartmap.sample.ch1.controller.view;import org.springframework.stereotype.Controller;import org.springframework.ui.Model;import org.springframework.util.StringUtils;import org.springframew... 阅读全文
摘要:
package com.smartmap.sample.ch1.controller.view;import java.io.File;import java.io.IOException;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.core.env.Environ... 阅读全文
摘要:
package com.smartmap.sample.ch1.controller.rest;import java.util.List;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import org.springframework.beans.factory.annota... 阅读全文
摘要:
package com.smartmap.sample.ch1.conf;import java.util.List;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import org.springframework.context.annotation.Conf... 阅读全文
摘要:
package com.smartmap.sample.ch1.controller.view;import java.io.IOException;import java.util.Collections;import java.util.HashMap;import java.util.List;import java.util.Map;import javax.servlet.Servlet... 阅读全文