我正在尝试使用@PreAuthorize注释的弹簧安全性(用户角色授权)的示例,遇到以下错误.
Caused by: org.springframework.beans.BeanInstantiationException:
Failed to instantiate [org.aopalliance.intercept.MethodInterceptor]:
Factory method 'methodSecurityInterceptor' threw exception; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'methodSecurityInterceptor': Requested bean is currently in creation: Is there an unresolvable circular reference?
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
... 91 more
Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'methodSecurityInterceptor': Requested bean is currently in creation: I
s there an unresolvable circular reference?
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.beforeSingletonCreation(DefaultSingletonBeanRegistry.java:347)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.security.access.intercept.aopalliance.MethodSecurityMetadataSourceAdvisor.getAdvice(MethodSecurityMetadataSourceAdvisor.java:107)
at org.springframework.aop.aspectj.AspectJProxyUtils.isAspectJAdvice(AspectJProxyUtils.java:67)
at org.springframework.aop.aspectj.AspectJProxyUtils.makeAdvisorChainAspectJCapableIfNecessary(AspectJProxyUtils.java:49)
Run Code Online (Sandbox Code Playgroud)
我的WebSecurityConfigurerAdapter …
我有这样的课:
public class Test {
private String Fname;
private String Lname;
private String Age;
// getters, setters, constructor, toString, equals, hashCode, and so on
}
Run Code Online (Sandbox Code Playgroud)
和一个List<Test> testList
充满Test
元素的列表.
如何获得age
使用Java 8的最小值和最大值?
我在日志中的时间戳格式如下
2016-04-07 18:11:38.169 which is yyyy-MM-dd HH:mm:ss.SSS
Run Code Online (Sandbox Code Playgroud)
这个日志文件不是实时的(存储的/旧的),我试图用 logstash @timestamp 值替换这个时间戳,以改进 Kibana 可视化。
我在 logstash 中的过滤器如下所示
grok {
match => {
"message" => [ "(?<timestamp>(\d){4}-(\d){2}-(\d){2} (\d){2}:(\d){2}:(\d){2}.(\d){3}) %{SYSLOG5424SD} ERROR u%{BASE16FLOAT}.%{JAVACLASS} - TransId:2b948ed5-12c0-4ae0-9b99-f1ee01191001 - TransactionId ::\"2b948ed5-12c0-4ae0-9b99-f1ee01191001\"- Actual Time taken to process \:\: %{NUMBER:responseTime:int}" ]
}
}
date {
match => [ "timestamp:date" , "yyyy-MM-dd HH:mm:ss.SSS Z" ]
timezone => "UTC"
target => "@timestamp"
}
Run Code Online (Sandbox Code Playgroud)
但是,它并没有取代@timestamp 值,Json 值
{
"_index": "logstash-2017.02.09",
"_type": "logs",
"_id": "AVoiZq2ITxwgj2avgkZa",
"_score": null,
"_source": {
"path": "D:\\SoftsandTools\\Kibana\\Logs_ActualTimetakentoprocess.log",
"@timestamp": "2017-02-09T10:23:58.778Z", …
Run Code Online (Sandbox Code Playgroud) 我正在尝试对目录下的所有日志文件执行 grep /var/log/application/archived/
而且我有 sudo 访问权限。像下面这样尝试给我错误
sudo grep 'checkThis' /var/log/application/archived/*.log
Run Code Online (Sandbox Code Playgroud)
错误
grep: /var/log/application/archived/*.log: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我尝试使用转义字符,但似乎不起作用
如果我给出任何一个文件名而不是 * 它会给我结果。
例如:sudo grep 'checkThis' /var/log/application/archived/firstLogFile.log
这给了我预期的响应
java ×2
curl ×1
grep ×1
java-8 ×1
java-stream ×1
linux ×1
list ×1
logstash ×1
purge ×1
rabbitmq ×1
rabbitmqctl ×1
spring-boot ×1
sudo ×1
user-roles ×1