`
文章列表

读excel文件生成sql

    博客分类:
  • java
import java.io.*; import java.util.ArrayList; import java.util.List; public class StringToolSqlFormatter { private static final String SQL_1 = "update t_call_data set DECISION_COMPLETE_TYPE='BATCH_DECISION_COMPILTE' where REGISTER_ID=%s and DATE_FORMAT(IMPORT_TIME,'%Y-%m-%e')=" ...
@EnableConfigServer @EnableDiscoveryClient @SpringBootApplication public class ConfigCenterApplication { public static void main(String[] args) { SpringApplication.run(ConfigCenterApplication.class, args); } } pom.xml <dependency> <groupId>org.springframewor ...

rabbitmq 使用

    博客分类:
  • java
API模块接收请求,推送到消息队列 router模块消费消息,分发到各个模块 每个模块消费消息,在推回API模块,因为api模块需要知道最终执行结果     API模块配置: spring:   cloud:     stream:       bindings:         outbound-agent-state-list.destination: outbound.agent-state-list   #生产         agent-state-list-reply-channel:                                    # ...
第一步:添加一个子模块:contract-coverage,然后在这个空的模块里只要发一个pom.xml即可,内容如下: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" ...
idea连接docker里的mysql镜像时报错: [28000][1045] Access denied for user 'root'@'172.17.0.1' (using password: YES)   解决: 命令:docker exec -it mysql /bin/bash 进入mysql:mysql -uroot -proot 开启远程访问: ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';    
第一种: @Transactional @Modifying @Query(value = "UPDATE UserPO SET voided = 1 where id = ?1") @Override void deleteById(@NotNull Long userId);   第二种:(更底层) @Entity @Table(name="TABLE") @ActionOverride(action="delete", with="activeFlag = false") public ...
打开一个word文档   第一步:定义宏 视图 中找到宏 输入宏名称setValue ,回车后编辑宏的内容如下 Sub setValue() ' ' setValue 宏 ' Dim doc_var As Variable     For Each doc_var In ActiveDocument.Variables         doc_var.Delete     Next          ActiveDocument.Variables("name").value = "zhangyan"          Ac ...
@SpringBootApplication @EnableJpaAuditing public class ContractElementApplication extends MyApplication implements CommandLineRunner { public static void main(String[] args) { run(ContractElementApplication.class, args); } @Autowired private ElementDatasourceConfig elementDat ...
参考官网:https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html 章节:  24.8.3 Merging Complex Types application.yml element-datasource: config: service1: url: method: content-type: service2: url: method: ...
authority 角色 permission 权限 authority_permission 中间表 现在要对中间表进行操作,但是中间表的两个字段分别是两个主表的外键,而不是主键,所以要给这张中间表创建一个联合主键,然后就可以对中间表进行操作了, 详见 AuthorityPermission.java AuthorityPermissionId.java    @Entity @Table(name = "authority", schema = "msa") @Cache(usage = CacheConcurrencyStrat ...
自定义表或者字段识别机制的前提条件是:springboot本身提供的策略解决不了我们的问题。   //在配置文件中加入这个,暂时还不可以识别大写表,但是列名映射createTime-->create_time spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy   //如果配置为这个,可以识别表,但是不能将createTime-->create_time spring.jpa.hiber ...
1.main.js 引入axios import axios from 'axios'; Vue.prototype.$http = axios;   2. 发起post请求 methods: submitForm:function(){ this.$http.get("/user/find?id=1").then(r=> console.log(r.data)); this.$http.defaults.headers.post['Content-Type']='application/json;charse ...
  1.配置application.yml datasource: url: jdbc:h2:mem:console username: sa password: driver-class-name: org.h2.Driver schema: classpath:schema.sql data: classpath:data.sql jpa: show-sql: false hibernate: ddl-auto: create database: h2 h2: console: enabled ...

gradle

解决: org.gradle.launcher.daemon.client.DaemonDisappearedException: Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)   将守护进程设置为false,在~/.gradle 目录下 gradle.properties 文件(如果没有则新建) org.gradle.daemon=FALSE org.gradle.jvmargs=-XX:MaxPermSize=1024m -XX:+HeapDum ...
@ControllerAdvicepublic class ResponseDataHandler implements ResponseBodyAdvice {    @Override    public boolean supports(MethodParameter returnType, Class converterType) {        return true;    }    @Override    public Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType sele ...
Global site tag (gtag.js) - Google Analytics