Skip to content

Commit

Permalink
write a line into test.file
Browse files Browse the repository at this point in the history
  • Loading branch information
huifer committed Sep 25, 2024
1 parent 62ec0e8 commit 8797eff
Show file tree
Hide file tree
Showing 12 changed files with 405 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/spring/cs8cc185c8-7ade-11ef-8431-acde48001122.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Copyright 2009-2015 the original author or authors.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* <p>
* Utilities to read resources.
*/
/**
* Utilities to read resources.
*/
package org.apache.ibatis.io;
36 changes: 36 additions & 0 deletions docs/spring/cs8cf7b36e-7ade-11ef-8431-acde48001122.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package com.huifer.aop.aspects;

import org.aspectj.lang.ProceedingJoinPoint;

/**
* 描述:
* 通知类
*
* @author huifer
* @date 2019-03-03
*/
public class MyAdvice {

public void log() {
System.out.println("log");
}


/**
* 环绕通知的使用: 事务管理的时候使用
*
* @param joinPoint
* @throws Throwable
*/
public void around(ProceedingJoinPoint joinPoint) throws Throwable {
System.out.println("环绕通知start \t 开启事务");
// 提交事务
Object proceed = joinPoint.proceed();
System.out.println("环绕通知end \t 结束事务");
}

public void throwAdvice() {
System.out.println("异常通知");
}

}
17 changes: 17 additions & 0 deletions docs/spring/cs8d2fb76e-7ade-11ef-8431-acde48001122.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.huifer.concurrence.ch2.producer_consumer;

/**
* <p>Title : Main </p>
* <p>Description : main</p>
*
* @author huifer
* @date 2019-03-28
*/
public class Main {

public static void main(String[] args) {
SharedObject sharedObject = new SharedObject();
new Producer(sharedObject).start();
new Consumer(sharedObject).start();
}
}
12 changes: 12 additions & 0 deletions docs/spring/cs8d689c28-7ade-11ef-8431-acde48001122.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.huifer.bilibili.monitoring.intf.detailed.second;

import com.huifer.bilibili.monitoring.SecondModel;
import com.huifer.bilibili.monitoring.intf.label.MonitoringFieldWork;

public interface SecondFieldWorkMonitoring extends MonitoringFieldWork<SecondModel> {
void workByWorkField(boolean work);

default Class<?> type() {
return SecondModel.class;
}
}
22 changes: 22 additions & 0 deletions docs/spring/cs8db57ef8-7ade-11ef-8431-acde48001122.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.huifer.design.singleton;

/**
* <p>Title : EnumSing </p>
* <p>Description : 枚举式</p>
*
* @author huifer
* @date 2019-05-16
*/
public enum EnumSing {
INSTANCE;
private Object instance;

EnumSing() {
instance = new Object();
}

public Object getInstance() {
return instance;
}

}
44 changes: 44 additions & 0 deletions docs/spring/cs8deeedc8-7ade-11ef-8431-acde48001122.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package com.huifer.securityuserview.entity;

/**
* 资源类:本实例指的是访问路径
*/
@Entity
public class SysResource {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", length = 10)
private Integer id;

@Column(name = "resourceName", length = 1000)
private String resourceName;

public int getId() {
return id;
}

public void setId(int id) {
this.id = id;
}

public void setId(Integer id) {
this.id = id;
}

public String getResourceName() {
return resourceName;
}

public void setResourceName(String resourceName) {
this.resourceName = resourceName;
}

@Override
public String toString() {
return "SysResource{" +
"id=" + id +
", resourceName='" + resourceName + '\'' +
'}';
}
}

22 changes: 22 additions & 0 deletions docs/spring/cs8e54a49c-7ade-11ef-8431-acde48001122.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.huifer.zk.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
* <p>Title : SayController </p>
* <p>Description : </p>
*
* @author huifer
* @date 2019-05-29
*/
@RestController
public class SayController {

@GetMapping("/say")
public String say(@RequestParam String message) {
return "接收内容 : " + message;
}

}
10 changes: 10 additions & 0 deletions docs/spring/cs8e955776-7ade-11ef-8431-acde48001122.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.huifer.utils.controller;


import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class BaseBase {
}
59 changes: 59 additions & 0 deletions docs/spring/cs8eca8676-7ade-11ef-8431-acde48001122.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package com.huifer.idgen.my.service;

import com.huifer.idgen.my.service.bean.Id;
import com.huifer.idgen.my.service.bean.enums.IdType;
import com.huifer.idgen.my.service.populator.AtomicIdPopulator;
import com.huifer.idgen.my.service.populator.IdPopulator;
import com.huifer.idgen.my.service.populator.LockIdPropulator;
import com.huifer.idgen.my.service.populator.SyncIdPopulator;
import com.huifer.idgen.my.service.util.CommonUtils;

/**
* @author: wang
* @description:
*/
public class GenIdServiceImpl extends AbstractIdService {

public static final String SYNC_LOCK = "lock";
public static final String ATOMIC = "atomic";

protected IdPopulator idPopulator;

public GenIdServiceImpl() {
super();
initPopulator();
}

/**
* {@link IdType} id类型决定时间戳
*
* @param idType
*/
public GenIdServiceImpl(IdType idType) {
super(idType);
initPopulator();
}

public GenIdServiceImpl(String idType) {
super(idType);
initPopulator();
}


public void initPopulator() {
if (idPopulator != null) {
} else if (CommonUtils.isPropKeyOn(SYNC_LOCK)) {
idPopulator = new SyncIdPopulator();
} else if (CommonUtils.isPropKeyOn(ATOMIC)) {
idPopulator = new AtomicIdPopulator();
} else {
idPopulator = new LockIdPropulator();
}
}

@Override
protected void populateId(Id id) {
idPopulator.populatorId(id, this.idMeta);
}

}
50 changes: 50 additions & 0 deletions docs/spring/cs8efdc1b2-7ade-11ef-8431-acde48001122.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* Copyright 2009-2018 the original author or authors.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ibatis.submitted.generictypes;

import java.util.List;

public class Group {

private Integer id;
private User<String> owner;
private List<String> members;

public Integer getId() {
return id;
}

public void setId(Integer id) {
this.id = id;
}

public User<String> getOwner() {
return owner;
}

public void setOwner(User<String> owner) {
this.owner = owner;
}

public List<String> getMembers() {
return members;
}

public void setMembers(List<String> members) {
this.members = members;
}

}
Loading

0 comments on commit 8797eff

Please sign in to comment.