-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
405 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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("异常通知"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 + '\'' + | ||
'}'; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
||
} |
Oops, something went wrong.