spring-boot
我是全栈架构师
高级架构师
展开
-
springboot使用jackson xml请求与响应
<dependency> <groupId>com.fasterxml.jackson.dataformat</groupId> <artifactId>jackson-dataformat-xml</artifactId></dependency>@JacksonXmlRootElement(localName = "interface")public class FpResponse implements S原创 2021-08-20 11:04:48 · 759 阅读 · 0 评论 -
Springboot打war包或以war包方式运行
客户要求能同时兼容tomcat7和tomcat8, 配置如下:1. 主启动类继承SpringBootServletInitializer类2. pom.xml加入javax.servlet-api依赖<dependency> <groupId>javax.servlet</groupId> <artifactId>javax.s...原创 2019-12-27 12:04:05 · 350 阅读 · 0 评论 -
Spring CLI示例快速入门
1. 下载spring-boot-cli-1.4.0.BUILD-SNAPSHOT-bin.zip spring-boot-cli-1.4.0.BUILD-SNAPSHOT-bin.tar.gz2. Spring CLI示例快速入门下面是一个相当简单的web应用,你可以用它测试Spring CLI安装是否成功。创建 一个名叫 app.groovy 的文件(放在bin目录下):@RestContr原创 2017-11-09 16:08:08 · 408 阅读 · 0 评论 -
Spring-Boot thymeleaf异常
异常1:Whitelabel Error PageThis application has no explicit mapping for /error, so you are seeing this as a fallback.Fri Nov 10 10:52:06 CST 2017 There was an unexpected error (type=Internal Server Erro原创 2017-11-10 11:06:59 · 6425 阅读 · 0 评论 -
TestRestTemplate注入时异常NoSuchBeanDefinitionException
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.ums.biz.user.service.UserServiceTest': Unsatisfied dependency expressed through field 'testRestTempl原创 2017-11-22 15:29:54 · 6420 阅读 · 5 评论 -
hint: specify index/type/name arguments for simple parameters to avoid type ambiguities
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IOrderDao': Could not resolve matching constructor (hint: specify index/type/name arguments for simple原创 2017-11-27 16:31:53 · 6131 阅读 · 0 评论 -
Spring Boot上传文件
#配置用spring boot的话, 这个配置不需要<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"/>#Java 代码@RestController@RequestMapping("upload")@...原创 2018-08-01 10:45:03 · 182 阅读 · 0 评论 -
Shell脚本启动springboot应用
check.shAPP_NAME=$1tpid=`ps -ef|grep java|grep $APP_NAME|grep -v grep|grep -v kill|awk '{print $2}'`if [ ${tpid} ]; then echo 'App is running.' echo ${tpid}else echo 'App ...原创 2018-08-02 15:41:45 · 1745 阅读 · 0 评论