
spring-boot
工匠解码
庖丁解牛,工匠解码
展开
-
spring boot 日志输出到 log.path_IS_UNDEFINED目录
springboot项目,logback配置文件如下<appender name="console" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%date|%thread|%X{invokeNo}|%level|%logger{0}|%msg%n</pattern>原创 2017-11-30 17:32:55 · 16686 阅读 · 1 评论 -
is expected to be of type but was actually of type 'com.sun.proxy.$Proxy70'
spring boot项目,启动报这个异常原因是:我通过@EnableTransactionManagement 启动了事务,但是没有开启cglib的动态代理。application.properties增加如下配置#aopspring.aop.auto=truespring.aop.proxy-target-class=true依赖中增加: org.spring原创 2017-12-01 15:09:23 · 1746 阅读 · 0 评论 -
使用spring boot搭建与dubbo整合项目
项目地址:https://github.com/BruceZhangXL/wolf 这是一个完整的使用spring boot搭建的整合dubbo的项目脚手架构建:maven 基础:spring-boot ORM:mybatis 数据库:MySQL 中间件:redis,rabbitMQ项目结构启动说明找到wolf-web下的Application类,右击:run as:java applic原创 2017-12-13 17:23:04 · 2254 阅读 · 1 评论 -
Spring boot实现多环境配置
在实际项目中,我们一般会放置一些配置文件,这些配置文件是区分环境的,一般环境有dev,test,prep,prod,分别对应开发,测试,预发布,生产。那么在spring boot项目中如何实现不同环境,使用不同的配置文件呢。第一步:定义好不同环境的application.propertiesapplication.properties 存放公用的一些配置。 以及最重要的配置 spring.pro原创 2017-12-25 11:51:05 · 1058 阅读 · 0 评论 -
Spring boot日志配置
步骤1:增加logback配置文件 注意:名字是logback.xml或者是logback-spring.xml,推荐是logback-spring.xml,为啥?因为spring boot框架默认会去寻找名字为这个的配置,并增加一些特性。步骤2:logback.xml的内容配置<?xml version="1.1" encoding="UTF-8"?><configuration> <s原创 2017-12-25 12:00:16 · 705 阅读 · 0 评论 -
spring boot版本演进
最近项目中想引入spring boot,所以想对spring boot的前世今生做个深入了解,整理了其版本演进情况,来源于spring boot的github:https://github.com/spring-projects/spring-boot/releases?after=v1.0.0.RC3版本号发布时间备注v0.5.0.M1 2013-08-06v1.0.0.RELEASE 20原创 2017-12-04 10:17:18 · 9558 阅读 · 0 评论 -
spring boot 异常Refused to display in a frame because it set 'X-Frame-Options' to 'DENY'
spring boot项目,请求回来,响应头中X-Frame-Options被设置为DENY,如下图这个会导致使用iframe模式上传图片或者iframe嵌套页面时,会报如下异常信息: Refused to display in a frame because it set ‘X-Frame-Options’ to ‘DENY’解决方案:扩展WebSecurityConfigurerAdapter原创 2017-12-27 09:08:25 · 8337 阅读 · 0 评论