`
gwj41
  • 浏览: 99325 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论
文章列表
后端Java代码需要设置response的header,如下   response.setContentType("application/octet-stream; charset=utf8"); response.setHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM_VALUE); response.setHeader(HttpHeaders.CONTENT_DISPOSITION,"attachment; filename="+zipName); An ...
其实用Elasticsearch比较完美,redis的版本只能从开头的字符匹配,但是ELK还不会,准备学学,先用redis实现下,redis返回的提示信息的list,就省略不写了。 页面代码片段   <div> <label for="autocomplete">Auto complete</label> <input id="autocomplete" type="text" (keyup)="onKey($event)" /> </d ...
现在很多项目都使用前后端分离来实现,前后端通过ajax, restful的httpclient来调用,传输数据,以下是angular上传文件到后端JAVA的例子。 <div> <label for="file">Upload file</label> <input id="file" #file type="file" multiple (change)="upload(file)" /> <span *ngIf="upload ...
在启动类中继承SpringBootServletInitializer,然后重写这个方法 public void onStartup(ServletContext servletContext) throws ServletException { super.onStartup(servletContext); // This will set to use COOKIE only servletContext.setSessionTrackingModes( Collections.singlet ...
公司有个项目,有两个子项目,两个独立的工程,我们组用的Spring boot,没有web.xml的,另一个项目组是用的liferay,有liferay6定制的tomcat7,做到中后期,客户说要放在一个tomcat里面,但是spring boot的war包放在liferay的tomcat下报错,特么只好去找怎么在spring boot里面搞个web.xml。。。先在java/webapp/WEB-INF/下面加入web.xml   <?xml version="1.0" encoding="UTF-8"?> <web-app xm ...
搬家了搬家了~  
UPDATE opportunity INNER JOIN opp_stage_checklist ON opportunity.id = opp_stage_checklist.opp_id AND opportunity.stage_number = opp_stage_checklist.stage_number <set> opportunity.status_code = 3,opportunity.update_date = NOW() </set> ...
获取List中的泛型类型,创建对象,并且字段设置值 for (Field f : partPropType.getDeclaredFields()) { if ("accountPrincipalApproveList".equals(f.getName())) { f.setAccessible(true); List accountPrincipalApproveList = new ArrayList(); if(f.getType() = ...
myProps: #自定义的属性和值 simpleProp: simplePropValue arrayProps: 1,2,3,4,5 #数组 listProp1: #List<Map<String, String>> - name: abc value: abcValue - name: efg value: efgValue listProp2: #List - config2Value1 - config2Vavlue2 mapP ...
配置第一个datasource(Primary)   /** * Druid数据源配置 */ @Configuration @MapperScan(basePackages = DataSourceConfig.PACKAGE, sqlSessionFactoryRef = "sessionFactory",sqlSessionTemplateRef = "sqlSessionTemplate") public class DataSourceConfig { static final String PACKAGE = &q ...
<div class="iteye-blog-content-contain" style="font-size: 14px"> 在有了构建RabbitMQ 静态Shovel的经验,构建动态Shevol有显得容易多了 首先和构建静态Shovel一样,先运行两个RabbitMQ节点rabbitmq_a和rabbitmq_b,然后给rabbitmq_a设置shevol: docker exec rabbitmq_a bash -c "rabbitmqctl set_parameter shovel my-shovel '{\&qu ...
实现RabbitMQ的远程通信和复制,可以在广域网上使用   1.用Docker启动两个RabbitMQ节点 docker run -d --name=rabbitmqa -p 5772:5672 -p 15772:15672 -e RABBITMQ_NODENAME=rabbitmqa -h rabbitmqa rabbitmq:3.6.9-management docker run -d --name=rabbitmqb -p 5773:5672 -p 15773:15672 -e RABBITMQ_NODENAME=rabbitmqb -h rabbitmqb rabbitmq ...
必须配置datasource才可以看到自己建的表 spring.datasource.url=jdbc:h2:file:~/test spring.datasource.username=sa spring.datasource.password= spring.datasource.driver-class-name=org.h2.Driver  
/** * Druid数据源配置 */ @Configuration public class DataSourceConfig { private static String dbUrl; private static String username; private static String password; private static String driverClassName; private static int initialSize; private static int minI ...
$("#deleteSingleUser").click(function (e) { e.preventDefault(); var id = $("#userId").val(); <spring:url value="/robbie/deleteSingleUser/" htmlEscape="true" javaScriptEscape="true" var="urlte ...
Global site tag (gtag.js) - Google Analytics