I have been try to run Zookeeper and Kafka on Docker container.
I got a lot of errors [error occurred during error reporting , id 0xb] and [Too many errors, abort] in my terminal. And then library initialization failed - unable to allocate file descriptor table - out of memory.
I use the following docker-compose.yml file
version: "3.8"
services:
zookeeper:
image: confluentinc/cp-zookeeper:5.5.4
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
image: confluentinc/cp-kafka:5.5.4
# If you want to expose these ports outside …Run Code Online (Sandbox Code Playgroud) 我在春季项目中创建了一个新的安全表达式,但它不起作用。这是我的代码。
首先,我做了一个CustomPermissionEvaluator工具PermissionEvaluator:
public class CustomPermissionEvaluator implements PermissionEvaluator {
@Override
public boolean hasPermission(Authentication auth, Object targetDomainObject, Object permission) {
if ((auth == null) || (targetDomainObject == null) || !(permission instanceof String)) {
return false;
}
final String targetType = targetDomainObject.getClass().getSimpleName().toUpperCase();
return hasPrivilege(auth, targetType, permission.toString().toUpperCase());
}
@Override
public boolean hasPermission(Authentication auth, Serializable targetId, String targetType, Object permission) {
if ((auth == null) || (targetType == null) || !(permission instanceof String)) {
return false;
}
return hasPrivilege(auth, targetType.toUpperCase(), permission.toString().toUpperCase()); …Run Code Online (Sandbox Code Playgroud)