e_e
- 浏览: 82522 次
- 性别:
- 来自: 上海
社区版块
- ( 0)
- ( 0)
- ( 0)
最新评论
文章列表
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';
- 2019-04-01 20:10
- 浏览 2248
- 分类:开源软件
- 博客分类:
- mysql,jpa,hibernate
第一种:
@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 ...
- 2019-03-04 11:32
- 浏览 449
- 分类:开源软件
- 博客分类:
- office
打开一个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 ...
- 2019-02-01 17:50
- 浏览 1911
- 分类:开源软件
- 博客分类:
- springboot
@springbootapplication
@enablejpaauditing
public class contractelementapplication extends myapplication implements commandlinerunner {
public static void main(string[] args) {
run(contractelementapplication.class, args);
}
@autowired
private elementdatasourceconfig elementdat ...
- 2019-01-28 10:19
- 浏览 814
- 分类:开源软件
- 博客分类:
- springboot
参考凯发k8国际娱乐官网入口官网: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:
...
- 2019-01-25 23:34
- 浏览 704
- 分类:企业架构
- 博客分类:
- mysql,jpa,hibernate
authority 角色
permission 权限
authority_permission 中间表
现在要对中间表进行操作,但是中间表的两个字段分别是两个主表的外键,而不是主键,所以要给这张中间表创建一个联合主键,然后就可以对中间表进行操作了,
详见
authoritypermission.java
authoritypermissionid.java
@entity
@table(name = "authority", schema = "msa")
@cache(usage = cacheconcurrencystrat ...
- 2019-01-14 15:41
- 浏览 2420
- 分类:开源软件
- 博客分类:
- springboot
自定义表或者字段识别机制的前提条件是:springboot本身提供的策略解决不了我们的问题。
//在配置文件中加入这个,暂时还不可以识别大写表,但是列名映射createtime-->create_time
spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.springphysicalnamingstrategy
//如果配置为这个,可以识别表,但是不能将createtime-->create_time
spring.jpa.hiber ...
- 2018-11-21 19:39
- 浏览 2438
- 分类:编程语言
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 ...
- 2018-10-18 09:27
- 浏览 2181
- 分类:web前端
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 ...
- 2018-10-17 09:06
- 浏览 1017
- 分类:编程语言
- 博客分类:
- 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 ...
- 2018-10-15 14:43
- 浏览 482
- 分类:开源软件
- 博客分类:
- springboot
@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 ...
- 2018-10-10 14:59
- 浏览 6521
- 分类:企业架构
- 博客分类:
- java
一、定义注解
package com.yare.annotation;
import java.lang.annotation.*;
/**
* @author : zhangyan 2018/9/19
* 日志注解
*/
@retention(retentionpolicy.runtime)
@target({elementtype.method})
@inherited
@documented
public @interface log {
string logstr() default "";
}
2.定义切面 ...
- 2018-09-19 16:03
- 浏览 2210
- 分类:企业架构
- 博客分类:
- springcloud
前提:本服务和要调用的服务都注册到consul
1.引入依赖:
org.springframework.cloud
spring-cloud-starter-openfeign
2. 启动类上面加上
@enablefeignclients
3.本地stub
@feignclient("bank-card-identifier&qu ...
- 2018-08-27 14:26
- 浏览 957
- 分类:开源软件
- 博客分类:
- java
public string combineallfields(string split) {
final field[] fields = this.getclass().getdeclaredfields();
if (fields.length < 1) {
return null;
}
stringbuffer result = new stringbuffer();
for (int i = 0; i < fields.length; i ) {
char[] cs = fields[i].g ...
- 2018-08-22 17:43
- 浏览 522
- 分类:编程语言
- 博客分类:
- java
一、表设计:
drop table if exists `ma_quartz_info`;
create table `ma_quartz_info` (
`id` bigint(20) not null auto_increment comment '主键',
`name` varchar(32) default '' comment '定时任务名称',
`code` varchar(64) default '' comment '定时任务code标识',
`cycle` varchar(32) default '' comment '定时任务执行周期',
...
- 2018-05-04 11:35
- 浏览 647
- 分类:企业架构