- 博客(7)
- 资源 (1)
- 问答 (1)
- 收藏
- 关注
原创 使用post方式重定向或转发
response.sendRedirect使用的是get方式提交,如果想要post,看下面public static void redirect(String url, Map,String> params, HttpServletResponse response) throws IOException { response.setContentType("text/html")
2018-04-27 16:52:19 13730 2
原创 spring boot cors解决跨域问题
package com.rw.finance.client.config;import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.cors.CorsConfig...
2018-04-21 14:17:20 696
原创 spring boot ThreadPoolTaskScheduler
package com.rw.finance.task.task;import java.util.*; import java.util.concurrent.ScheduledFuture;import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factor...
2018-04-21 11:35:01 3401
转载 spring boot 中Spring data jpa命名策略
数据库,表字段命名是驼峰命名法(UserID),Spring data jpa 自动更新之后是 user_id, 表字段不对照,Spring data jpa基于Hibernate5.0application.properties 写法1、无修改命名spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.nami...
2018-04-21 11:14:37 1210
原创 BaseEntity
spring boot jpa BaseEntitypackage com.hhf.study.client.entity;import javax.persistence.Column;import javax.persistence.GeneratedValue;import javax.persistence.Id;import javax.persistence.MappedSu...
2018-04-21 11:11:44 2977
转载 spring boot activemq延迟消息投递核心代码
延迟消息投递public void timingSend(String message, String queueName, Long timeStamp) { //获取连接工厂 ConnectionFactory connectionFactory = this.jmsMessagingTemplate.getConnectionFactory(); try { /...
2018-04-21 11:02:05 3957 1
原创 mybatis获取新增记录自增ID
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="activeId"> SELECT LAST_INSERT_ID()</selectKey>在mapper.xml的insert标签中添加如上代码,keyProperty为模型主键字段名称...
2018-04-21 10:58:39 1178
TA创建的收藏夹 TA关注的收藏夹
TA关注的人