springboot security oauth2 报错 java.lang.IllegalArgumentException: URI must not be null 5C
 2018-11-14 17:12:11.816 [http-nio-8081-exec-1] WARN  o.s.s.o.p.token.RemoteTokenServices-Null Client ID or Client Secret detected. Endpoint that requires authentication will reject request with 401 error. 
2018-11-14 17:12:11.823 [http-nio-8081-exec-1] ERROR o.a.c.c.C.[.[.[.[dispatcherServlet]-Servlet.service() for servlet [dispatcherServlet] in context with path [/smartHome] threw exception 
java.lang.IllegalArgumentException: URI must not be null
    at org.springframework.util.Assert.notNull(Assert.java:193)
    at org.springframework.web.util.UriComponentsBuilder.fromUriString(UriComponentsBuilder.java:197)
    at org.springframework.web.util.DefaultUriBuilderFactory$DefaultUriBuilder.initUriComponentsBuilder(DefaultUriBuilderFactory.java:218)
    at org.springframework.web.util.DefaultUriBuilderFactory$DefaultUriBuilder.<init>(DefaultUriBuilderFactory.java:214)
    at org.springframework.web.util.DefaultUriBuilderFactory.uriString(DefaultUriBuilderFactory.java:197)
    at org.springframework.web.util.DefaultUriBuilderFactory.expand(DefaultUriBuilderFactory.java:191)
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:679)
    at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:600)
    at org.springframework.security.oauth2.provider.token.RemoteTokenServices.postForMap(RemoteTokenServices.java:147)
    at org.springframework.security.oauth2.provider.token.RemoteTokenServices.loadAuthentication(RemoteTokenServices.java:106)
    at org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationManager.authenticate(OAuth2AuthenticationManager.java:83)
    at org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:150)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at com.lx.smarthome.securityoauth.permit.PermitAuthenticationFilter.doFilterInternal(PermitAuthenticationFilter.java:122)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)

2个回答

正常情况下:

![![



图片说明](https://img-ask.csdn.net/upload/201811/15/1542243751_545443.png)


图片说明](https://img-ask.csdn.net/upload/201811/15/1542243674_674681.png)

 2018-11-15 08:57:16.697 [http-nio-8081-exec-3] INFO  c.l.s.s.p.PermitAuthenticationFilter-请求信息==== { url : /smartHome/user/Login | remoteAddr : 127.0.0.1 | requestMethod : POST
param : {phone:["13553406767"],code:null,userLoginType["0"]} 
2018-11-15 08:57:16.698 [http-nio-8081-exec-3] DEBUG o.apache.commons.beanutils.BeanUtils-BeanUtils.populate(User{, userId=null, username=null, password=null, phone=null, email=null, salt=null, userGateways=null}, org.apache.catalina.util.ParameterMap@2a18900e) 
2018-11-15 08:57:16.698 [http-nio-8081-exec-3] DEBUG o.a.commons.beanutils.ConvertUtils-Convert string '13553406767' to class 'java.lang.String' 
2018-11-15 08:57:16.698 [http-nio-8081-exec-3] DEBUG o.a.c.b.converters.StringConverter-Converting 'String' value '13553406767' to type 'String' 
2018-11-15 08:57:16.698 [http-nio-8081-exec-3] DEBUG o.a.commons.beanutils.ConvertUtils-Convert string '667788' to class 'java.lang.String' 
2018-11-15 08:57:16.698 [http-nio-8081-exec-3] DEBUG o.a.c.b.converters.StringConverter-Converting 'String' value '667788' to type 'String' 
2018-11-15 08:57:16.698 [http-nio-8081-exec-3] DEBUG o.a.commons.beanutils.ConvertUtils-Convert string '0' to class 'java.lang.String' 
2018-11-15 08:57:16.698 [http-nio-8081-exec-3] DEBUG o.a.c.b.converters.StringConverter-Converting 'String' value '0' to type 'String' 
2018-11-15 08:57:16.698 [http-nio-8081-exec-3] DEBUG org.mybatis.spring.SqlSessionUtils-Creating a new SqlSession 
2018-11-15 08:57:16.698 [http-nio-8081-exec-3] DEBUG org.mybatis.spring.SqlSessionUtils-SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@21c4eece] was not registered for synchronization because synchronization is not active 
2018-11-15 08:57:16.721 [http-nio-8081-exec-3] DEBUG o.m.s.t.SpringManagedTransaction-JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@2c9baf1] will not be managed by Spring 
2018-11-15 08:57:16.721 [http-nio-8081-exec-3] DEBUG c.l.s.a.user.dao.UserMapper.getUser-==>  Preparing: SELECT userId, nickname,username, password, phone, email, salt FROM user where phone=? and username=?  
2018-11-15 08:57:16.722 [http-nio-8081-exec-3] DEBUG c.l.s.a.user.dao.UserMapper.getUser-==> Parameters: 13553406767(String), 13553406767(String) 
2018-11-15 08:57:16.735 [http-nio-8081-exec-3] DEBUG c.l.s.a.user.dao.UserMapper.getUser-<==      Total: 1 

异常情况:

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Servlet 报错 java.lang.NullPointerException

# Servlet 报错 java.lang.NullPointerException ##一个由Tomcat部署的数据库Web程序 > 代码是老师提供的,应该没什么大问题,同学用eclipse跑起来都正常,但是我用IDEA出问题了。 **下面的表单POST之后,就报错** java.lang.NullPointerException com.action.library.LoginAction.memberLogin(LoginAction.java:12) com.controller.library.LoginServlet.service(LoginServlet.java:30) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ------- <form action="servlet/LoginServlet" method="POST"> <table> <tr> <td>Member Number:</td> <td><input type="text" name="member_no"></td> </tr> <tr> <td>Password:</td> <td><input type="password" name="password"></td> </tr> <tr> <td><input type="submit" value="提交"></td> <td><input type="reset" value="重置"></td> </tr> </table> </form> ``` <form action="servlet/LoginServlet" method="POST"> <table> <tr> <td>Member Number:</td> <td><input type="text" name="member_no"></td> </tr> <tr> <td>Password:</td> <td><input type="password" name="password"></td> </tr> <tr> <td><input type="submit" value="提交"></td> <td><input type="reset" value="重置"></td> </tr> </table> </form> ``` ------- ``` public class LoginServlet extends HttpServlet { private static final long serialVersionUID = -8052223741830167994L; public LoginServlet() { } public void service(HttpServletRequest request, HttpServletResponse response) { try { request.setCharacterEncoding("utf-8"); } catch (UnsupportedEncodingException var10) { var10.printStackTrace(); } String memberNo = request.getParameter("member_no"); String password = request.getParameter("password"); LoginAction login = new LoginAction(); Member member = login.memberLogin(memberNo, password); if (member == null) { try { response.sendRedirect("/library/login_incorrect.html"); } catch (IOException var9) { var9.printStackTrace(); } } else { request.getSession().setAttribute("member", member); try { response.sendRedirect("/library/servlet/RefreshMainPageServlet"); } catch (IOException var8) { var8.printStackTrace(); } } } } ``` ``` public class LoginAction { public LoginAction() { } public Member memberLogin(String memberNo, String password) { DaoManager dm = DaoManager.getInstance(); MemberDao memberDao = (MemberDao)dm.getDao(MemberDao.class); Member member = null; try { dm.begin(); member = memberDao.getMemberByMemberNoAndPassword(memberNo, password); dm.commit(); } catch (Exception var10) { var10.printStackTrace(); } finally { dm.end(); } return member; } } ```

SpringBoot启动时序列化对象时报java.lang.StackOverflowError错

## 将项目改造成SpringBoot,使用了AOP切面日志,配置完之后启动项目,报java.lang.StackOverflowError错。 ![图片说明](https://img-ask.csdn.net/upload/201901/10/1547108865_176468.png) ## 下面是我的AOP配置: ![图片说明](https://img-ask.csdn.net/upload/201901/10/1547109003_103025.jpg) ## 打过断点,定位到报错的地方是其中的:LogInterceptor.java ![图片说明](https://img-ask.csdn.net/upload/201901/10/1547109238_391654.jpg) ## new Gson().toJson(arguments[i])往底层走,在这一步报: ![图片说明](https://img-ask.csdn.net/upload/201901/10/1547109468_321175.jpg) ![图片说明](https://img-ask.csdn.net/upload/201901/10/1547109526_454269.jpg) ![图片说明](https://img-ask.csdn.net/upload/201901/10/1547109597_183507.png) ## 百度了很多方法,但是没有找到有效的,求大佬指点迷津!

A类使用static块报错 java.lang.NoClassDefFoundError

java.lang.NoClassDefFoundError: Could not initialize class XXXclass 是什么原因? 有两台服务器 一台启动正常 一台启动不正常 报了这个 我是跑任务的时候 写了个类,直接调 A.aaa(),好像根本就没执行static静态代码块里面的方法。 A里面有个static静态块,里面的方法没执行就报错了。

springboot 2.1.3 集成redis 打包报错

springboot2.1.3 集成redis 打包报错:Caused by: java.lang.NoSuchMethodError: org.springframework.data.redis.connection.RedisConnection.getConfig(Ljava/lang/String;)Ljava/util/List; 错误提示信息如下: ![图片说明](https://img-ask.csdn.net/upload/201903/22/1553248347_202415.png) ![图片说明](https://img-ask.csdn.net/upload/201903/22/1553248361_130461.png) POM文件: ![图片说明](https://img-ask.csdn.net/upload/201903/22/1553248218_566429.png) 有谁遇到过,帮帮忙

java.lang.ClassNotFoundException异常,哪位大神来帮我看看

严重: Error configuring application listener of class com.huaxu.readmeter.modules.sys.listener.WebContextListener java.lang.ClassNotFoundException: com.huaxu.readmeter.modules.sys.listener.WebContextListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:506) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:488) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:115) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4932) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:677) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1912) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 六月 09, 2017 8:04:46 上午 org.apache.catalina.core.StandardContext listenerStart 严重: Skipped installing application listeners due to previous error(s) 六月 09, 2017 8:04:46 上午 org.apache.catalina.core.StandardContext startInternal 严重: One or more listeners failed to start. Full details will be found in the appropriate container log file 六月 09, 2017 8:04:46 上午 org.apache.catalina.core.StandardContext startInternal 严重: Context [/jeesite] startup failed due to previous errors 六月 09, 2017 8:04:46 上午 org.apache.catalina.startup.HostConfig deployDescriptor 信息: Deployment of configuration descriptor D:\HLHTCB\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\conf\Catalina\localhost\jeesite.xml has finished in 3,648 ms 六月 09, 2017 8:04:46 上午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["http-bio-8080"] 六月 09, 2017 8:04:46 上午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["ajp-bio-8009"] 六月 09, 2017 8:04:46 上午 org.apache.catalina.startup.Catalina start 信息: Server startup in 4076 ms 我有这个类为什么编译不到呢?我重新clean项目了,也重新加载了maven了

spring security oauth2 的一个问题 求大神指点

在oauth2根据授权码获取accsess token时,通关Debug发现在TokenEndpoint类下的getAccessToken方法内会根据principal去数据库获取client_id,但principal内存储的是当前用户的信息,然后就会报错:Given client ID does not match authenticated client 求大神解答怎么破. security.xml文件如下: ``` <?xml version="1.0" encoding="UTF-8"?> <beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oauth2="http://www.springframework.org/schema/security/oauth2" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd"> <!-- 指定不需要权限过滤的路径 --> <http pattern="/login.jsp" security="none" /> <http pattern="/aouth/token" create-session="stateless" authentication-manager-ref="oauth2AuthenticationManager" entry-point-ref="oauth2AuthenticationEntryPoint"> <!-- 设置拦截地址和规则 --> <intercept-url pattern="/aouth/token" access="IS_AUTHENTICATED_FULLY" /> <!-- 非匿名 --> <anonymous enabled="false" /> <http-basic entry-point-ref="oauth2AuthenticationEntryPoint" /> <!-- 设置过滤链 --> <custom-filter ref="clientCredentialsTokenEndpointFilter" before="BASIC_AUTH_FILTER" /> <!-- 拒绝访问处理 --> <access-denied-handler ref="oauthAccessDeniedHandler" /> </http> <!--一个自定义的filter,必须包含authenticationManager,accessDecisionManager,securityMetadataSource三个属性, 我们的所有控制将在这三个类中实现 --> <beans:bean id="myFilter" class="com.yichi.mvcm.filter.MyFilterSecurityInterceptor"> <beans:property name="authenticationManager" ref="authenticationManager" /> <beans:property name="accessDecisionManager" ref="myAccessDecisionManagerBean" /> <beans:property name="securityMetadataSource" ref="myInvocationSecurityMetadataSource" /> </beans:bean> <!-- 认证客户端的manager --> <authentication-manager id="oauth2AuthenticationManager"> <authentication-provider user-service-ref="oauth2ClientDetailsUserService" /> </authentication-manager> <!-- spring security提供的用户登录验证 ,alias的值对应上面的ref="authenticationManager" --> <authentication-manager alias="authenticationManager"> <!--userDetailServiceImpl 获取登录的用户、用户权限 --> <authentication-provider user-service-ref="myUserDetailService" /> <!-- 缓存 --> <!-- <authentication-provider user-service-ref="cachingUserDetailsService" /> --> </authentication-manager> <!-- 缓存 --> <!-- <beans:bean id="cachingUserDetailsService" class="org.springframework.security.config.authentication.CachingUserDetailsService"> <beans:constructor-arg ref="myUserDetailService" /> 缓存UserDetails的UserCache <beans:property name="userCache" ref="userCache"/> </beans:bean> <beans:bean id="userCache" class="org.springframework.security.core.userdetails.cache.EhCacheBasedUserCache"> 用于真正缓存的Ehcache对象 <beans:property name="cache" ref="ehcache4UserDetails"></beans:property> </beans:bean> <beans:bean id="ehcache4UserDetails" class="org.springframework.cache.ehcache.EhCacheFactoryBean" /> --> <!--在这个类中,你就可以从数据库中读入用户的密码,角色信息,是否锁定,账号是否过期等 --> <beans:bean id="myUserDetailService" class="com.yichi.mvcm.filter.MyUserDetailService"> <!-- 配置成员变量 --> <beans:property name="sysUserService" ref="sysUserService" /> </beans:bean> <!--访问决策器,决定某个用户具有的角色,是否有足够的权限去访问某个资源 --> <beans:bean id="myAccessDecisionManagerBean" class="com.yichi.mvcm.filter.MyAccessDecisionManager"> </beans:bean> <beans:bean id="sysResService" class="com.yichi.mvcm.service.sys.SysResService"></beans:bean> <!--资源源数据定义,将所有的资源和权限对应关系建立起来,即定义某一资源可以被哪些角色访问 --> <beans:bean id="myInvocationSecurityMetadataSource" class="com.yichi.mvcm.filter.MyInvocationSecurityMetadataSource"> <!-- 配置成员变量 --> <beans:constructor-arg> <beans:ref bean="sysResService" /> </beans:constructor-arg> </beans:bean> <!-- 配置client客户端信息 --> <authentication-manager id="clientAuthenticationManager"> <authentication-provider user-service-ref="oauth2ClientDetailsUserService" /> </authentication-manager> <beans:bean id="oauth2ClientDetailsUserService" class="org.springframework.security.oauth2.provider.client.ClientDetailsUserDetailsService"> <beans:constructor-arg ref="clientDetailsService" /> </beans:bean> <!-- 数据库读取客户端信息 --> <beans:bean id="clientDetailsService" class="com.yichi.mvcm.filter.CustomJdbcClientDetailsService"> <beans:constructor-arg index="0" ref="dataSource" /> </beans:bean> <!-- 资源filter配置 --> <oauth2:resource-server id="picResourceServer" resource-id="pic-resource" token-services-ref="tokenServices" /> <!-- 配token service用于生成访问令牌token --> <beans:bean id="tokenServices" class="org.springframework.security.oauth2.provider.token.DefaultTokenServices"> <beans:property name="tokenStore" ref="tokenStore" /> <!-- 是否生成更新令牌 默认为false --> <beans:property name="supportRefreshToken" value="true" /> <beans:property name="clientDetailsService" ref="clientDetailsService" /> </beans:bean> <!-- token仓库 可以选择存储在内存或者数据库 --> <!-- <beans:bean id="tokenStore" class="org.springframework.security.oauth2.provider.token.store.InMemoryTokenStore"> </beans:bean> --> <beans:bean id="tokenStore" class="org.springframework.security.oauth2.provider.token.store.JdbcTokenStore"> <beans:constructor-arg index="0" ref="dataSource" /> </beans:bean> <!-- 资源 --> <http pattern="/mvcm/**" create-session="never" entry-point-ref="oauth2AuthenticationEntryPoint" access-decision-manager-ref="oauth2AccessDecisionManager"> <anonymous enabled="false" /> <intercept-url pattern="/mvcm/**" access="ROLE_index,SCOPE_READ" /> <custom-filter ref="picResourceServer" before="PRE_AUTH_FILTER" /> <access-denied-handler ref="oauthAccessDeniedHandler" /> </http> <beans:bean id="oauth2AuthenticationEntryPoint" class="org.springframework.security.oauth2.provider.error.OAuth2AuthenticationEntryPoint" /> <beans:bean id="oauthAccessDeniedHandler" class="org.springframework.security.oauth2.provider.error.OAuth2AccessDeniedHandler" /> <beans:bean id="oauth2AccessDecisionManager" class="org.springframework.security.access.vote.UnanimousBased"> <beans:constructor-arg> <beans:list> <beans:bean class="org.springframework.security.oauth2.provider.vote.ScopeVoter" /> <beans:bean class="org.springframework.security.access.vote.RoleVoter" /> <beans:bean class="org.springframework.security.access.vote.AuthenticatedVoter" /> </beans:list> </beans:constructor-arg> </beans:bean> <!-- user-approval-page:用户第三方登录认证以后的授权确认页面 error-page : 客户端申请授权的数据与服务端的不相同时跳转的页面 --> <oauth2:authorization-server client-details-service-ref="clientDetailsService" token-services-ref="tokenServices" user-approval-handler-ref="oauthUserApprovalHandler" user-approval-page="oauth_approval" error-page="oauth_error"> <oauth2:authorization-code authorization-code-services-ref="authorizationCodeServices" /> <oauth2:implicit /> <oauth2:refresh-token /> <oauth2:client-credentials /> <oauth2:password /> </oauth2:authorization-server> <!-- 授权码存储到数据库 --> <beans:bean id="authorizationCodeServices" class="org.springframework.security.oauth2.provider.code.JdbcAuthorizationCodeServices"> <beans:constructor-arg index="0" ref="dataSource" /> </beans:bean> <beans:bean id="oauthUserApprovalHandler" class="org.springframework.security.oauth2.provider.approval.DefaultUserApprovalHandler" /> <!-- <beans:bean id="clientCredentialsTokenEndpointFilter" class="org.springframework.security.oauth2.provider.client.ClientCredentialsTokenEndpointFilter"> <beans:property name="authenticationManager" ref="clientAuthenticationManager" /> </beans:bean> --> <beans:bean id="clientCredentialsTokenEndpointFilter" class="org.springframework.security.oauth2.provider.client.ClientCredentialsTokenEndpointFilter"> <beans:property name="authenticationManager" ref="clientAuthenticationManager" /> </beans:bean> <http auto-config="true" use-expressions="true"> <!-- 没有权限时跳转的页面 --> <access-denied-handler error-page="/accessDenied.jsp" /> <!-- 使用自定义的登录页面 login_page:指定登录页面 authentication-failure-url:登录失败跳转到/login.jsp login-processing-url进行认证拦截的请求路径 username-parameter和 password-parameter指定属性name字段 default-target-url认证成功默认跳转页面 --> <form-login login-page="/login.jsp" authentication-failure-url="/login.jsp?error=1" login-processing-url="/springSecurity" username-parameter="account" password-parameter="password" default-target-url="/index.jsp" /> <intercept-url pattern="/oauth/**" access="hasRole('ROLE_userOrg')" /> <!-- 设置单用户登录 --> <session-management> <!-- max-sessions表示最多允许多少次重复登录。如果没有配置error-if-maximum-exceeded, 那么用户账号的第二次登录会使第一次登录失效,而配置了的话,那么第二次登录会被阻止。 通常的做法是阻止第二次登录。 --> <concurrency-control max-sessions="1" error-if-maximum-exceeded="false" /> </session-management> <custom-filter ref="myFilter" before="FILTER_SECURITY_INTERCEPTOR" /> <!-- 检测失效的sessionId,session超时时,定位到另外一个URL --> <session-management invalid-session-url="/login.jsp" /> <logout invalidate-session="true" logout-success-url="/" logout-url="/logout" /> </http> </beans:beans> ```

SpringBoot+security+oauth2+jwt 整合怎么搞?

搞了几天,账户密码保存在内存中可以,但是保存到数据中就不行了, 求大神指教,这个该怎么搞? ``` @Autowired public void globalUserDetails(AuthenticationManagerBuilder auth) throws Exception { // auth.inMemoryAuthentication().passwordEncoder(NoOpPasswordEncoder.getInstance()) // .withUser("user").password("user").roles("USER") // .and() // .withUser("app_client").password("nopass").roles("USER") // .and() // .withUser("admin").password("admin").roles("ADMIN"); //配置用户来源于数据库 auth.userDetailsService(userDetailsService()); } ```

java.lang.NoClassDefFoundError:

java 开发中遇到java.lang.NoClassDefFoundError: org/apache/avalon/framework/CascadingThrowable 错误信息,有时候会报,是什么原因导致的,如何解决,各路英雄好汉。下面附件错哦无信息图片和代码。谢谢 ![图片说明](https://img-ask.csdn.net/upload/201608/26/1472206505_121021.png) package cn.com.pkufi.business.web.action.wechat; import org.apache.avalon.framework.ExceptionUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import cn.com.jingpeng.business.util.authorize.AuthorizeUtil; import cn.com.jingpeng.business.web.action.BaseAction; public class Test1 extends BaseAction{ private String forwardUrl; private String openId; private String code; private static final Logger logger = LoggerFactory.getLogger("wechat"); public String oauth2() { try { logger.info("[被动方式]授权用户获得的code : "+code+",req:"+request.getParameter("code")); String oauth2AccessToken = "" ; AuthorizeUtil.authorize(code); openId = AuthorizeUtil.openId; oauth2AccessToken = AuthorizeUtil.oauth2AccessToken ; session.put("Oauth2.AccessToken", oauth2AccessToken); logger.info("[被动方式]授权用户获得的openid : "+openId); session.put("wechat.openId", openId); logger.info("[被动方式]授权后跳转, forwardUrl: "+forwardUrl); logger.info("=============授权成功==============="); } catch (Exception e) { logger.error(ExceptionUtil.printStackTrace(e)); e.printStackTrace(); return ERROR; } return SUCCESS; } public String getOpenId() { return openId; } public void setOpenId(String openId) { this.openId = openId; } public String getForwardUrl() { return forwardUrl; } public void setForwardUrl(String forwardUrl) { this.forwardUrl = forwardUrl; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } @Override protected void processResultBusiness(boolean resultSuccess, String resultCode, String resultDescription) { // TODO Auto-generated method stub } } ``` ``` [16-8-26 9:25:24:234 CST] 00000ad1 SystemOut O 2016-08-26 09:25:24,234 [WebContainer : 17] [org.hibernate.impl.SessionImpl] DEBUG org.hibernate.impl.SessionImpl -opened session at timestamp: 14721747242 [16-8-26 9:25:24:235 CST] 00000ad1 SystemOut O 2016-08-26 09:25:24,235 [WebContainer : 17] [cn.com.pkufi.business.web.action.wechat.AuthorityAction] INFO wechat -[被动方式]授权用户获得的code : null [16-8-26 9:25:24:236 CST] 00000ad1 DefaultDispat E com.opensymphony.xwork2.util.logging.commons.CommonsLogger error Exception occurred during processing request: Method "oauth2" failed for object cn.com.pkufi.business.web.action.wechat.AuthorityAction@23fb8621 ognl.MethodFailedException: Method "oauth2" failed for object cn.com.pkufi.business.web.action.wechat.AuthorityAction@23fb8621 [java.lang.NoClassDefFoundError: org/apache/avalon/framework/CascadingThrowable] at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1306) at ognl.ObjectMethodAccessor.callMethod(ObjectMethodAccessor.java:68)

Spring Security OAuth2 请求报错

提示找不到请求类型 Handling error: InvalidRequestException, Missing grant type ![图片说明](https://img-ask.csdn.net/upload/201908/26/1566820213_702119.png) ![图片说明](https://img-ask.csdn.net/upload/201908/26/1566820222_335803.png) https://pan.baidu.com/s/1Pvb35lZeMyDx_JhVc1qzBA

springBoot整合kafka启动报错

报错日志如下,groupId=MyGroupId时可以正常连接,但是groupId=etl时就连接不到报错了,麻烦大神看看,如果需要别的相关文件窝在提供,在线等,给跪了 ``` _ _ _ _ _ _ __ _ ___ ____ | | | (_) | | | | (_)/ _| | | |__ \ |___ \ | |__| |_ | | | |_ __ _| |_ __ _ ___| |_ ) | __) | | __ | | | | | | '_ \| | _/ _` / __| __| / / |__ < | | | | | | |__| | | | | | || (_| \__ \ |_ / /_ _ ___) | |_| |_|_| \____/|_| |_|_|_| \__,_|___/\__| |____(_)____/ 2020-02-21 23:53:40.414 mallSearch [main] INFO c.u.j.c.EnableEncryptablePropertiesConfiguration - Bootstraping jasypt-string-boot auto configuration in context: application-1 2020-02-21 23:53:40.414 mallSearch [main] INFO c.c.mall.mallsearch.ReportManagerApplication - The following profiles are active: dev 2020-02-21 23:53:42.148 mallSearch [main] WARN org.mybatis.spring.mapper.ClassPathMapperScanner - No MyBatis mapper was found in '[cn.chinaunicom.sdsi.**.entity, cn.chinaunicom.mall.**.entity]' package. Please check your configuration. 2020-02-21 23:53:42.476 mallSearch [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! 2020-02-21 23:53:42.476 mallSearch [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. 2020-02-21 23:53:42.695 mallSearch [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 219ms. Found 9 repository interfaces. 2020-02-21 23:53:42.710 mallSearch [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! 2020-02-21 23:53:42.710 mallSearch [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. 2020-02-21 23:53:42.804 mallSearch [main] INFO o.s.d.r.c.RepositoryConfigurationExtensionSupport - Spring Data Redis - Could not safely identify store assignment for repository candidate interface cn.chinaunicom.mall.mallsearch.repository.AttrCategoryDocumentRepository. 2020-02-21 23:53:42.804 mallSearch [main] INFO o.s.d.r.c.RepositoryConfigurationExtensionSupport - Spring Data Redis - Could not safely identify store assignment for repository candidate interface cn.chinaunicom.mall.mallsearch.repository.AttrDocumentRepository. 2020-02-21 23:53:42.819 mallSearch [main] INFO o.s.d.r.c.RepositoryConfigurationExtensionSupport - Spring Data Redis - Could not safely identify store assignment for repository candidate interface cn.chinaunicom.mall.mallsearch.repository.AttrValueDocumentRepository. 2020-02-21 23:53:42.819 mallSearch [main] INFO o.s.d.r.c.RepositoryConfigurationExtensionSupport - Spring Data Redis - Could not safely identify store assignment for repository candidate interface cn.chinaunicom.mall.mallsearch.repository.BrandDocumentRepository. 2020-02-21 23:53:42.819 mallSearch [main] INFO o.s.d.r.c.RepositoryConfigurationExtensionSupport - Spring Data Redis - Could not safely identify store assignment for repository candidate interface cn.chinaunicom.mall.mallsearch.repository.CategorytreeDocumentRepository. 2020-02-21 23:53:42.819 mallSearch [main] INFO o.s.d.r.c.RepositoryConfigurationExtensionSupport - Spring Data Redis - Could not safely identify store assignment for repository candidate interface cn.chinaunicom.mall.mallsearch.repository.GoodsPoolComSpuDocumentRepository. 2020-02-21 23:53:42.819 mallSearch [main] INFO o.s.d.r.c.RepositoryConfigurationExtensionSupport - Spring Data Redis - Could not safely identify store assignment for repository candidate interface cn.chinaunicom.mall.mallsearch.repository.GoodsSkuDocumentRepository. 2020-02-21 23:53:42.819 mallSearch [main] INFO o.s.d.r.c.RepositoryConfigurationExtensionSupport - Spring Data Redis - Could not safely identify store assignment for repository candidate interface cn.chinaunicom.mall.mallsearch.repository.GoodsSpuCategorytreeDocumentRepository. 2020-02-21 23:53:42.819 mallSearch [main] INFO o.s.d.r.c.RepositoryConfigurationExtensionSupport - Spring Data Redis - Could not safely identify store assignment for repository candidate interface cn.chinaunicom.mall.mallsearch.repository.GoodsSpuDocumentRepository. 2020-02-21 23:53:42.819 mallSearch [main] INFO o.s.d.r.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 31ms. Found 0 repository interfaces. 2020-02-21 23:53:43.522 mallSearch [main] INFO o.springframework.cloud.context.scope.GenericScope - BeanFactory id=f1ad9868-69a4-3087-8cf7-8a78137ec329 2020-02-21 23:53:43.554 mallSearch [main] INFO c.u.j.c.EnableEncryptablePropertiesBeanFactoryPostProcessor - Post-processing PropertySource instances 2020-02-21 23:53:43.601 mallSearch [main] INFO c.u.j.EncryptablePropertySourceConverter - Converting PropertySource configurationProperties [org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertySource] to AOP Proxy 2020-02-21 23:53:43.601 mallSearch [main] INFO c.u.j.EncryptablePropertySourceConverter - Converting PropertySource servletConfigInitParams [org.springframework.core.env.PropertySource$StubPropertySource] to EncryptablePropertySourceWrapper 2020-02-21 23:53:43.632 mallSearch [main] INFO c.u.j.EncryptablePropertySourceConverter - Converting PropertySource servletContextInitParams [org.springframework.core.env.PropertySource$StubPropertySource] to EncryptablePropertySourceWrapper 2020-02-21 23:53:43.632 mallSearch [main] INFO c.u.j.EncryptablePropertySourceConverter - Converting PropertySource systemProperties [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper 2020-02-21 23:53:43.632 mallSearch [main] INFO c.u.j.EncryptablePropertySourceConverter - Converting PropertySource systemEnvironment [org.springframework.boot.env.SystemEnvironmentPropertySourceEnvironmentPostProcessor$OriginAwareSystemEnvironmentPropertySource] to EncryptableMapPropertySourceWrapper 2020-02-21 23:53:43.632 mallSearch [main] INFO c.u.j.EncryptablePropertySourceConverter - Converting PropertySource random [org.springframework.boot.env.RandomValuePropertySource] to EncryptablePropertySourceWrapper 2020-02-21 23:53:43.632 mallSearch [main] INFO c.u.j.EncryptablePropertySourceConverter - Converting PropertySource applicationConfig: [classpath:/application-dev.yml] [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper 2020-02-21 23:53:43.632 mallSearch [main] INFO c.u.j.EncryptablePropertySourceConverter - Converting PropertySource applicationConfig: [classpath:/config/application.yml] [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper 2020-02-21 23:53:43.632 mallSearch [main] INFO c.u.j.EncryptablePropertySourceConverter - Converting PropertySource applicationConfig: [classpath:/application.yml] [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper 2020-02-21 23:53:43.632 mallSearch [main] INFO c.u.j.EncryptablePropertySourceConverter - Converting PropertySource springCloudClientHostInfo [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper 2020-02-21 23:53:43.632 mallSearch [main] INFO c.u.j.EncryptablePropertySourceConverter - Converting PropertySource defaultProperties [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper 2020-02-21 23:53:43.694 mallSearch [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.kafka.annotation.KafkaBootstrapConfiguration' of type [org.springframework.kafka.annotation.KafkaBootstrapConfiguration$$EnhancerBySpringCGLIB$$46cfe68c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2020-02-21 23:53:43.710 mallSearch [main] INFO c.u.j.filter.DefaultLazyPropertyFilter - Property Filter custom Bean not found with name 'encryptablePropertyFilter'. Initializing Default Property Filter 2020-02-21 23:53:43.850 mallSearch [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$bcb9d43] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2020-02-21 23:53:44.069 mallSearch [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'objectPostProcessor' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2020-02-21 23:53:44.085 mallSearch [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@70f5f59d' of type [org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2020-02-21 23:53:44.085 mallSearch [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$30a03ff5] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2020-02-21 23:53:44.132 mallSearch [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2020-02-21 23:53:44.163 mallSearch [main] INFO c.u.j.resolver.DefaultLazyPropertyResolver - Property Resolver custom Bean not found with name 'encryptablePropertyResolver'. Initializing Default Property Resolver 2020-02-21 23:53:44.163 mallSearch [main] INFO c.u.j.detector.DefaultLazyPropertyDetector - Property Detector custom Bean not found with name 'encryptablePropertyDetector'. Initializing Default Property Detector 2020-02-21 23:53:44.179 mallSearch [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'spring.cache-org.springframework.boot.autoconfigure.cache.CacheProperties' of type [org.springframework.boot.autoconfigure.cache.CacheProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2020-02-21 23:53:44.194 mallSearch [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'unifastRedisCacheConfig' of type [cn.chinaunicom.sdsi.security.cache.config.UnifastRedisCacheConfig$$EnhancerBySpringCGLIB$$7185313] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2020-02-21 23:53:44.335 mallSearch [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$8f37d806] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2020-02-21 23:53:45.006 mallSearch [main] INFO o.s.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 9011 (http) 2020-02-21 23:53:45.022 mallSearch [main] INFO org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-9011"] 2020-02-21 23:53:45.038 mallSearch [main] INFO org.apache.catalina.core.StandardService - Starting service [Tomcat] 2020-02-21 23:53:45.038 mallSearch [main] INFO org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.16] 2020-02-21 23:53:45.053 mallSearch [main] INFO org.apache.catalina.core.AprLifecycleListener - The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jdk1.8.0_144\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files (x86)\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.8.0_144\bin;C:\Program Files\Git\cmd;C:\Program Files\apache-maven-3.2.2\bin;C:\Program Files\Mysql\bin;C:\Program Files\MySQL\MySQL Utilities 1.6\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\TortoiseSVN\bin;D:\工具\curl-7.59.0-win64-mingw\bin;C:\WINDOWS\System32\OpenSSH\;C:\Windows\WinSxS\amd64_microsoft-windows-telnet-client_31bf3856ad364e35_10.0.17134.1_none_9db21dbc8e34d070;C:\Program Files\nodejs\;D:\nginx-1.13.7;C:\Program Files\erl10.4\bin;D:\工具\rabbitmq_server-3.7.15\sbin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\TortoiseGit\bin;C:\Users\xiaolei\AppData\Local\Microsoft\WindowsApps;;C:\Users\xiaolei\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\xiaolei\AppData\Roaming\npm;.] 2020-02-21 23:53:45.350 mallSearch [main] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext 2020-02-21 23:53:45.350 mallSearch [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 4905 ms 2020-02-21 23:53:47.034 mallSearch [main] INFO org.elasticsearch.plugins.PluginsService - no modules loaded 2020-02-21 23:53:47.036 mallSearch [main] INFO org.elasticsearch.plugins.PluginsService - loaded plugin [org.elasticsearch.index.reindex.ReindexPlugin] 2020-02-21 23:53:47.036 mallSearch [main] INFO org.elasticsearch.plugins.PluginsService - loaded plugin [org.elasticsearch.join.ParentJoinPlugin] 2020-02-21 23:53:47.039 mallSearch [main] INFO org.elasticsearch.plugins.PluginsService - loaded plugin [org.elasticsearch.percolator.PercolatorPlugin] 2020-02-21 23:53:47.039 mallSearch [main] INFO org.elasticsearch.plugins.PluginsService - loaded plugin [org.elasticsearch.script.mustache.MustachePlugin] 2020-02-21 23:53:47.039 mallSearch [main] INFO org.elasticsearch.plugins.PluginsService - loaded plugin [org.elasticsearch.transport.Netty4Plugin] 2020-02-21 23:53:49.084 mallSearch [main] INFO o.s.d.e.client.TransportClientFactoryBean - Adding transport node : 10.236.6.52:9200 2020-02-21 23:54:20.425 mallSearch [main] ERROR o.s.d.e.r.support.AbstractElasticsearchRepository - failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{yZBpr1VZQfm3KgYuKq0eRA}{10.236.6.52}{10.236.6.52:9200}] 2020-02-21 23:54:20.940 mallSearch [main] ERROR o.s.d.e.r.support.AbstractElasticsearchRepository - failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{yZBpr1VZQfm3KgYuKq0eRA}{10.236.6.52}{10.236.6.52:9200}] 2020-02-21 23:54:20.971 mallSearch [main] ERROR o.s.d.e.r.support.AbstractElasticsearchRepository - failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{yZBpr1VZQfm3KgYuKq0eRA}{10.236.6.52}{10.236.6.52:9200}] 2020-02-21 23:54:21.034 mallSearch [main] ERROR o.s.d.e.r.support.AbstractElasticsearchRepository - failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{yZBpr1VZQfm3KgYuKq0eRA}{10.236.6.52}{10.236.6.52:9200}] 2020-02-21 23:54:21.065 mallSearch [main] ERROR o.s.d.e.r.support.AbstractElasticsearchRepository - failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{yZBpr1VZQfm3KgYuKq0eRA}{10.236.6.52}{10.236.6.52:9200}] 2020-02-21 23:54:21.112 mallSearch [main] ERROR o.s.d.e.r.support.AbstractElasticsearchRepository - failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{yZBpr1VZQfm3KgYuKq0eRA}{10.236.6.52}{10.236.6.52:9200}] 2020-02-21 23:54:21.315 mallSearch [main] ERROR o.s.d.e.r.support.AbstractElasticsearchRepository - failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{yZBpr1VZQfm3KgYuKq0eRA}{10.236.6.52}{10.236.6.52:9200}] 2020-02-21 23:54:21.362 mallSearch [main] ERROR o.s.d.e.r.support.AbstractElasticsearchRepository - failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{yZBpr1VZQfm3KgYuKq0eRA}{10.236.6.52}{10.236.6.52:9200}] 2020-02-21 23:54:21.643 mallSearch [main] INFO org.redisson.Version - Redisson 3.12.0 2020-02-21 23:54:21.909 mallSearch [redisson-netty-4-24] INFO o.r.connection.pool.MasterPubSubConnectionPool - 1 connections initialized for 10.236.6.54/10.236.6.54:6379 2020-02-21 23:54:21.956 mallSearch [redisson-netty-4-28] INFO org.redisson.connection.pool.MasterConnectionPool - 20 connections initialized for 10.236.6.54/10.236.6.54:6379 2020-02-21 23:54:22.690 mallSearch [main] ERROR o.s.d.e.r.support.AbstractElasticsearchRepository - failed to load elasticsearch nodes : org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{yZBpr1VZQfm3KgYuKq0eRA}{10.236.6.52}{10.236.6.52:9200}] 2020-02-21 23:54:22.971 mallSearch [main] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity<springfox.documentation.spring.web.json.Json> springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)] 2020-02-21 23:54:23.408 mallSearch [main] INFO o.s.security.web.DefaultSecurityFilterChain - Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@2408ca4c, org.springframework.security.web.context.SecurityContextPersistenceFilter@29509774, org.springframework.security.web.header.HeaderWriterFilter@3741a170, org.springframework.security.web.authentication.logout.LogoutFilter@1988e095, org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter@4870d2e1, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@9198fe3, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@4dfe14d4, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@2f7e2481, org.springframework.security.web.session.SessionManagementFilter@26c24e5, org.springframework.security.web.access.ExceptionTranslationFilter@4a467f08, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@5de15ce1] _____ __________ __________________ _______ ________ ______________ __ / / /___ __ \___ ____/___ __ \__ __ \___ __ \___ __/__|__ \ _ / / / __ /_/ /__ __/ __ /_/ /_ / / /__ /_/ /__ / ____/ / / /_/ / _ _, _/ _ /___ _ ____/ / /_/ / _ _, _/ _ / _ __/ \____/ /_/ |_| /_____/ /_/ \____/ /_/ |_| /_/ /____/ ........................................................................................................ . uReport, is a Chinese style report engine licensed under the Apache License 2.0, . . which is opensource, easy to use,high-performance, with browser-based-designer. . ........................................................................................................ 2020-02-21 23:54:25.330 mallSearch [main] WARN com.netflix.config.sources.URLConfigurationSource - No URLs will be polled as dynamic configuration sources. 2020-02-21 23:54:25.330 mallSearch [main] INFO com.netflix.config.sources.URLConfigurationSource - To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath. 2020-02-21 23:54:25.345 mallSearch [main] WARN com.netflix.config.sources.URLConfigurationSource - No URLs will be polled as dynamic configuration sources. 2020-02-21 23:54:25.345 mallSearch [main] INFO com.netflix.config.sources.URLConfigurationSource - To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath. 2020-02-21 23:54:25.720 mallSearch [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'applicationTaskExecutor' 2020-02-21 23:54:27.095 mallSearch [main] WARN o.s.b.a.freemarker.FreeMarkerAutoConfiguration - Cannot find template location(s): [classpath:/templates/] (please add some templates, check your FreeMarker configuration, or set spring.freemarker.checkTemplateLocation=false) 2020-02-21 23:54:29.282 mallSearch [main] INFO o.s.cloud.netflix.eureka.InstanceInfoFactory - Setting initial instance status as: STARTING 2020-02-21 23:54:29.360 mallSearch [main] INFO com.netflix.discovery.DiscoveryClient - Initializing Eureka in region us-east-1 2020-02-21 23:54:29.438 mallSearch [main] INFO c.n.discovery.provider.DiscoveryJerseyProvider - Using JSON encoding codec LegacyJacksonJson 2020-02-21 23:54:29.438 mallSearch [main] INFO c.n.discovery.provider.DiscoveryJerseyProvider - Using JSON decoding codec LegacyJacksonJson 2020-02-21 23:54:29.610 mallSearch [main] INFO c.n.discovery.provider.DiscoveryJerseyProvider - Using XML encoding codec XStreamXml 2020-02-21 23:54:29.610 mallSearch [main] INFO c.n.discovery.provider.DiscoveryJerseyProvider - Using XML decoding codec XStreamXml 2020-02-21 23:54:29.954 mallSearch [main] INFO c.n.d.shared.resolver.aws.ConfigClusterResolver - Resolving eureka endpoints via configuration 2020-02-21 23:54:30.266 mallSearch [main] INFO com.netflix.discovery.DiscoveryClient - Disable delta property : false 2020-02-21 23:54:30.375 mallSearch [main] INFO com.netflix.discovery.DiscoveryClient - Single vip registry refresh property : null 2020-02-21 23:54:30.375 mallSearch [main] INFO com.netflix.discovery.DiscoveryClient - Force full registry fetch : false 2020-02-21 23:54:30.375 mallSearch [main] INFO com.netflix.discovery.DiscoveryClient - Application is null : false 2020-02-21 23:54:30.375 mallSearch [main] INFO com.netflix.discovery.DiscoveryClient - Registered Applications size is zero : true 2020-02-21 23:54:30.375 mallSearch [main] INFO com.netflix.discovery.DiscoveryClient - Application version is -1: true 2020-02-21 23:54:30.375 mallSearch [main] INFO com.netflix.discovery.DiscoveryClient - Getting all instance registry info from the eureka server 2020-02-21 23:54:30.828 mallSearch [main] INFO com.netflix.discovery.DiscoveryClient - The response status is 200 2020-02-21 23:54:30.844 mallSearch [main] INFO com.netflix.discovery.DiscoveryClient - Starting heartbeat executor: renew interval is: 30 2020-02-21 23:54:30.844 mallSearch [main] INFO com.netflix.discovery.InstanceInfoReplicator - InstanceInfoReplicator onDemand update allowed rate per min is 4 2020-02-21 23:54:30.844 mallSearch [main] INFO com.netflix.discovery.DiscoveryClient - Discovery Client initialized at timestamp 1582300470844 with initial instances count: 8 2020-02-21 23:54:30.875 mallSearch [main] INFO o.s.c.n.e.serviceregistry.EurekaServiceRegistry - Registering application reportmanager with eureka with status UP 2020-02-21 23:54:30.875 mallSearch [main] INFO com.netflix.discovery.DiscoveryClient - Saw local status change event StatusChangeEvent [timestamp=1582300470875, current=UP, previous=STARTING] 2020-02-21 23:54:30.907 mallSearch [main] INFO org.apache.kafka.clients.consumer.ConsumerConfig - ConsumerConfig values: auto.commit.interval.ms = 1000 auto.offset.reset = earliest bootstrap.servers = [10.236.6.52:9092] check.crcs = true client.id = connections.max.idle.ms = 540000 default.api.timeout.ms = 60000 enable.auto.commit = true exclude.internal.topics = true fetch.max.bytes = 52428800 fetch.max.wait.ms = 500 fetch.min.bytes = 1 group.id = myGroupId heartbeat.interval.ms = 3000 interceptor.classes = [] internal.leave.group.on.close = true isolation.level = read_uncommitted key.deserializer = class org.apache.kafka.common.serialization.StringDeserializer max.partition.fetch.bytes = 1048576 max.poll.interval.ms = 300000 max.poll.records = 1000 metadata.max.age.ms = 300000 metric.reporters = [] metrics.num.samples = 2 metrics.recording.level = INFO metrics.sample.window.ms = 30000 partition.assignment.strategy = [class org.apache.kafka.clients.consumer.RangeAssignor] receive.buffer.bytes = 65536 reconnect.backoff.max.ms = 1000 reconnect.backoff.ms = 50 request.timeout.ms = 30000 retry.backoff.ms = 100 sasl.client.callback.handler.class = null sasl.jaas.config = null sasl.kerberos.kinit.cmd = /usr/bin/kinit sasl.kerberos.min.time.before.relogin = 60000 sasl.kerberos.service.name = null sasl.kerberos.ticket.renew.jitter = 0.05 sasl.kerberos.ticket.renew.window.factor = 0.8 sasl.login.callback.handler.class = null sasl.login.class = null sasl.login.refresh.buffer.seconds = 300 sasl.login.refresh.min.period.seconds = 60 sasl.login.refresh.window.factor = 0.8 sasl.login.refresh.window.jitter = 0.05 sasl.mechanism = GSSAPI security.protocol = PLAINTEXT send.buffer.bytes = 131072 session.timeout.ms = 10000 ssl.cipher.suites = null ssl.enabled.protocols = [TLSv1.2, TLSv1.1, TLSv1] ssl.endpoint.identification.algorithm = https ssl.key.password = null ssl.keymanager.algorithm = SunX509 ssl.keystore.location = null ssl.keystore.password = null ssl.keystore.type = JKS ssl.protocol = TLS ssl.provider = null ssl.secure.random.implementation = null ssl.trustmanager.algorithm = PKIX ssl.truststore.location = null ssl.truststore.password = null ssl.truststore.type = JKS value.deserializer = class org.apache.kafka.common.serialization.StringDeserializer 2020-02-21 23:54:31.016 mallSearch [main] INFO org.apache.kafka.common.utils.AppInfoParser - Kafka version : 2.0.1 2020-02-21 23:54:31.016 mallSearch [main] INFO org.apache.kafka.common.utils.AppInfoParser - Kafka commitId : fa14705e51bd2ce5 2020-02-21 23:54:31.313 mallSearch [DiscoveryClient-InstanceInfoReplicator-0] INFO com.netflix.discovery.DiscoveryClient - DiscoveryClient_REPORTMANAGER/192.168.62.1:9011: registering service... 2020-02-21 23:54:31.547 mallSearch [DiscoveryClient-InstanceInfoReplicator-0] INFO com.netflix.discovery.DiscoveryClient - DiscoveryClient_REPORTMANAGER/192.168.62.1:9011 - registration status: 204 2020-02-21 23:54:31.656 mallSearch [main] INFO org.apache.kafka.clients.Metadata - Cluster ID: rgWO07ohQH6Rn35woczhUQ 2020-02-21 23:54:31.719 mallSearch [main] INFO org.apache.kafka.clients.consumer.ConsumerConfig - ConsumerConfig values: auto.commit.interval.ms = 1000 auto.offset.reset = earliest bootstrap.servers = [10.236.6.52:9092] check.crcs = true client.id = connections.max.idle.ms = 540000 default.api.timeout.ms = 60000 enable.auto.commit = true exclude.internal.topics = true fetch.max.bytes = 52428800 fetch.max.wait.ms = 500 fetch.min.bytes = 1 group.id = myGroupId heartbeat.interval.ms = 3000 interceptor.classes = [] internal.leave.group.on.close = true isolation.level = read_uncommitted key.deserializer = class org.apache.kafka.common.serialization.StringDeserializer max.partition.fetch.bytes = 1048576 max.poll.interval.ms = 300000 max.poll.records = 1000 metadata.max.age.ms = 300000 metric.reporters = [] metrics.num.samples = 2 metrics.recording.level = INFO metrics.sample.window.ms = 30000 partition.assignment.strategy = [class org.apache.kafka.clients.consumer.RangeAssignor] receive.buffer.bytes = 65536 reconnect.backoff.max.ms = 1000 reconnect.backoff.ms = 50 request.timeout.ms = 30000 retry.backoff.ms = 100 sasl.client.callback.handler.class = null sasl.jaas.config = null sasl.kerberos.kinit.cmd = /usr/bin/kinit sasl.kerberos.min.time.before.relogin = 60000 sasl.kerberos.service.name = null sasl.kerberos.ticket.renew.jitter = 0.05 sasl.kerberos.ticket.renew.window.factor = 0.8 sasl.login.callback.handler.class = null sasl.login.class = null sasl.login.refresh.buffer.seconds = 300 sasl.login.refresh.min.period.seconds = 60 sasl.login.refresh.window.factor = 0.8 sasl.login.refresh.window.jitter = 0.05 sasl.mechanism = GSSAPI security.protocol = PLAINTEXT send.buffer.bytes = 131072 session.timeout.ms = 10000 ssl.cipher.suites = null ssl.enabled.protocols = [TLSv1.2, TLSv1.1, TLSv1] ssl.endpoint.identification.algorithm = https ssl.key.password = null ssl.keymanager.algorithm = SunX509 ssl.keystore.location = null ssl.keystore.password = null ssl.keystore.type = JKS ssl.protocol = TLS ssl.provider = null ssl.secure.random.implementation = null ssl.trustmanager.algorithm = PKIX ssl.truststore.location = null ssl.truststore.password = null ssl.truststore.type = JKS value.deserializer = class org.apache.kafka.common.serialization.StringDeserializer 2020-02-21 23:54:31.719 mallSearch [main] INFO org.apache.kafka.common.utils.AppInfoParser - Kafka version : 2.0.1 2020-02-21 23:54:31.719 mallSearch [main] INFO org.apache.kafka.common.utils.AppInfoParser - Kafka commitId : fa14705e51bd2ce5 2020-02-21 23:54:31.719 mallSearch [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskScheduler - Initializing ExecutorService 2020-02-21 23:54:31.734 mallSearch [main] INFO org.apache.kafka.clients.consumer.ConsumerConfig - ConsumerConfig values: auto.commit.interval.ms = 5000 auto.offset.reset = earliest bootstrap.servers = [127.0.0.1:9092] check.crcs = true client.id = connections.max.idle.ms = 540000 default.api.timeout.ms = 60000 enable.auto.commit = true exclude.internal.topics = true fetch.max.bytes = 52428800 fetch.max.wait.ms = 500 fetch.min.bytes = 1 group.id = etl heartbeat.interval.ms = 3000 interceptor.classes = [] internal.leave.group.on.close = true isolation.level = read_uncommitted key.deserializer = class org.apache.kafka.common.serialization.StringDeserializer max.partition.fetch.bytes = 1048576 max.poll.interval.ms = 300000 max.poll.records = 1000 metadata.max.age.ms = 300000 metric.reporters = [] metrics.num.samples = 2 metrics.recording.level = INFO metrics.sample.window.ms = 30000 partition.assignment.strategy = [class org.apache.kafka.clients.consumer.RangeAssignor] receive.buffer.bytes = 65536 reconnect.backoff.max.ms = 1000 reconnect.backoff.ms = 50 request.timeout.ms = 180000 retry.backoff.ms = 100 sasl.client.callback.handler.class = null sasl.jaas.config = null sasl.kerberos.kinit.cmd = /usr/bin/kinit sasl.kerberos.min.time.before.relogin = 60000 sasl.kerberos.service.name = null sasl.kerberos.ticket.renew.jitter = 0.05 sasl.kerberos.ticket.renew.window.factor = 0.8 sasl.login.callback.handler.class = null sasl.login.class = null sasl.login.refresh.buffer.seconds = 300 sasl.login.refresh.min.period.seconds = 60 sasl.login.refresh.window.factor = 0.8 sasl.login.refresh.window.jitter = 0.05 sasl.mechanism = GSSAPI security.protocol = PLAINTEXT send.buffer.bytes = 131072 session.timeout.ms = 120000 ssl.cipher.suites = null ssl.enabled.protocols = [TLSv1.2, TLSv1.1, TLSv1] ssl.endpoint.identification.algorithm = https ssl.key.password = null ssl.keymanager.algorithm = SunX509 ssl.keystore.location = null ssl.keystore.password = null ssl.keystore.type = JKS ssl.protocol = TLS ssl.provider = null ssl.secure.random.implementation = null ssl.trustmanager.algorithm = PKIX ssl.truststore.location = null ssl.truststore.password = null ssl.truststore.type = JKS value.deserializer = class org.apache.kafka.common.serialization.StringDeserializer 2020-02-21 23:54:31.734 mallSearch [main] INFO org.apache.kafka.common.utils.AppInfoParser - Kafka version : 2.0.1 2020-02-21 23:54:31.750 mallSearch [main] INFO org.apache.kafka.common.utils.AppInfoParser - Kafka commitId : fa14705e51bd2ce5 2020-02-21 23:54:32.016 mallSearch [org.springframework.kafka.KafkaListenerEndpointContainer#6-0-C-1] INFO org.apache.kafka.clients.Metadata - Cluster ID: rgWO07ohQH6Rn35woczhUQ 2020-02-21 23:54:32.047 mallSearch [org.springframework.kafka.KafkaListenerEndpointContainer#6-0-C-1] INFO o.a.k.c.consumer.internals.AbstractCoordinator - [Consumer clientId=consumer-2, groupId=myGroupId] Discovered group coordinator 10.236.6.52:9092 (id: 2147483646 rack: null) 2020-02-21 23:54:32.063 mallSearch [org.springframework.kafka.KafkaListenerEndpointContainer#6-0-C-1] INFO o.a.k.c.consumer.internals.ConsumerCoordinator - [Consumer clientId=consumer-2, groupId=myGroupId] Revoking previously assigned partitions [] 2020-02-21 23:54:32.063 mallSearch [org.springframework.kafka.KafkaListenerEndpointContainer#6-0-C-1] INFO o.s.kafka.listener.KafkaMessageListenerContainer - partitions revoked: [] 2020-02-21 23:54:32.063 mallSearch [org.springframework.kafka.KafkaListenerEndpointContainer#6-0-C-1] INFO o.a.k.c.consumer.internals.AbstractCoordinator - [Consumer clientId=consumer-2, groupId=myGroupId] (Re-)joining group 2020-02-21 23:54:32.391 mallSearch [org.springframework.kafka.KafkaListenerEndpointContainer#6-0-C-1] INFO o.a.k.c.consumer.internals.AbstractCoordinator - [Consumer clientId=consumer-2, groupId=myGroupId] Successfully joined group with generation 21 2020-02-21 23:54:32.406 mallSearch [org.springframework.kafka.KafkaListenerEndpointContainer#6-0-C-1] INFO o.a.k.c.consumer.internals.ConsumerCoordinator - [Consumer clientId=consumer-2, groupId=myGroupId] Setting newly assigned partitions [es-mall-brand-update-0] 2020-02-21 23:54:32.625 mallSearch [org.springframework.kafka.KafkaListenerEndpointContainer#6-0-C-1] INFO o.s.kafka.listener.KafkaMessageListenerContainer - partitions assigned: [es-mall-brand-update-0] 2020-02-21 23:54:32.828 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:54:33.969 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:54:35.219 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:54:36.468 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:54:37.937 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:54:39.764 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:54:41.904 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:54:44.185 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:54:46.372 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:54:48.309 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:54:50.231 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:54:52.152 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:54:54.370 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:54:56.495 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:54:58.416 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:55:00.588 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:55:02.602 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:55:04.540 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:55:06.570 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:55:08.617 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:55:10.507 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:55:12.459 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:55:14.506 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:55:16.631 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:55:18.802 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:55:20.708 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:55:22.848 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:55:24.988 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:55:27.113 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:55:29.346 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:55:31.611 mallSearch [main] WARN org.apache.kafka.clients.NetworkClient - [Consumer clientId=consumer-3, groupId=etl] Connection to node -1 could not be established. Broker may not be available. 2020-02-21 23:55:31.750 mallSearch [main] WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'org.springframework.kafka.config.internalKafkaListenerEndpointRegistry'; nested exception is org.apache.kafka.common.errors.TimeoutException: Timeout expired while fetching topic metadata 2020-02-21 23:55:31.782 mallSearch [main] INFO o.s.scheduling.concurrent.ThreadPoolTaskExecutor - Shutting down ExecutorService 'applicationTaskExecutor' 2020-02-21 23:55:32.516 mallSearch [main] INFO o.s.jmx.export.annotation.AnnotationMBeanExporter - Could not unregister MBean [com.github.tobato.fastdfs.conn:name=fdfsConnectionPool,type=FdfsConnectionPool] as said MBean is not registered (perhaps already unregistered by an external process) 2020-02-21 23:56:00.384 mallSearch [main] INFO com.netflix.discovery.DiscoveryClient - Shutting down DiscoveryClient ... 2020-02-21 23:56:00.431 mallSearch [main] WARN o.s.c.annotation.CommonAnnotationBeanPostProcessor - Destroy method on bean with name 'scopedTarget.eurekaClient' threw an exception: org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'eurekaInstanceConfigBean': Singleton bean creation not allowed while singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!) 2020-02-21 23:56:00.431 mallSearch [main] INFO org.apache.catalina.core.StandardService - Stopping service [Tomcat] 2020-02-21 23:56:00.462 mallSearch [main] INFO o.s.b.a.l.ConditionEvaluationReportLoggingListener - Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2020-02-21 23:56:00.478 mallSearch [main] ERROR org.springframework.boot.SpringApplication - Application run failed org.springframework.context.ApplicationContextException: Failed to start bean 'org.springframework.kafka.config.internalKafkaListenerEndpointRegistry'; nested exception is org.apache.kafka.common.errors.TimeoutException: Timeout expired while fetching topic metadata at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:185) at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:53) at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360) at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158) at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:893) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) at cn.chinaunicom.mall.mallsearch.ReportManagerApplication.main(ReportManagerApplication.java:85) Caused by: org.apache.kafka.common.errors.TimeoutException: Timeout expired while fetching topic metadata 2020-02-21 23:56:01.634 mallSearch [DiscoveryClient-InstanceInfoReplicator-0] WARN com.netflix.discovery.InstanceInfoReplicator - There was a problem with the instance info replicator org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'eurekaInstanceConfigBean' defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaClientAutoConfiguration.class]: Unsatisfied dependency expressed through method 'eurekaInstanceConfigBean' parameter 0; nested exception is org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'inetUtilsProperties': Could not bind properties to 'InetUtilsProperties' : prefix=spring.cloud.inetutils, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is java.lang.IllegalStateException: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@31c2affc has not been refreshed yet at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:769) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:509) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1305) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1144) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1247) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1167) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857) at org.springframework.beans.factory.support.ConstructorResolver.resolvePreparedArguments(ConstructorResolver.java:804) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:430) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1305) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1144) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$1(AbstractBeanFactory.java:356) at org.springframework.cloud.context.scope.GenericScope$BeanLifecycleWrapper.getBean(GenericScope.java:390) at org.springframework.cloud.context.scope.GenericScope.get(GenericScope.java:184) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:353) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:35) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:672) at com.netflix.appinfo.ApplicationInfoManager$$EnhancerBySpringCGLIB$$918f0f04.refreshDataCenterInfoIfRequired(<generated>) at com.netflix.discovery.DiscoveryClient.refreshInstanceInfo(DiscoveryClient.java:1377) at com.netflix.discovery.InstanceInfoReplicator.run(InstanceInfoReplicator.java:117) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) at java.util.concurrent.FutureTask.run(FutureTask.java) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'inetUtilsProperties': Could not bind properties to 'InetUtilsProperties' : prefix=spring.cloud.inetutils, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is java.lang.IllegalStateException: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@31c2affc has not been refreshed yet at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:110) at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:93) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:414) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1754) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1247) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1167) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857) at org.springframework.beans.factory.support.ConstructorResolver.resolvePreparedArguments(ConstructorResolver.java:804) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:430) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1305) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1144) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1247) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1167) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760) ... 37 common frames omitted Caused by: java.lang.IllegalStateException: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@31c2affc has not been refreshed yet at org.springframework.context.support.AbstractApplicationContext.assertBeanFactoryActive(AbstractApplicationContext.java:1092) at org.springframework.context.support.AbstractApplicationContext.getBeanProvider(AbstractApplicationContext.java:1134) at org.springframework.boot.context.properties.ConfigurationPropertiesBinder.getBindHandlerAdvisors(ConfigurationPropertiesBinder.java:138) at org.springframework.boot.context.properties.ConfigurationPropertiesBinder.getBindHandler(ConfigurationPropertiesBinder.java:130) at org.springframework.boot.context.properties.ConfigurationPropertiesBinder.bind(ConfigurationPropertiesBinder.java:82) at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:107) ... 65 common frames omitted Disconnected from the target VM, address: '127.0.0.1:62410', transport: 'socket' ```

java 空指针问题Caused by: java.lang.NullPointerException

![JSP](https://img-ask.csdn.net/upload/201904/17/1555511366_373406.jpg) ![JSP](https://img-ask.csdn.net/upload/201904/17/1555511417_590377.jpg) ``` //修改的方法 function editProduct() { var selectedRows = $("#dg").datagrid('getSelections'); if (selectedRows.length != 1) { $.messager.alert("系统提示", "请选择一条要编辑的数据!"); return; } var row = selectedRows[0]; $("#w").dialog("open").dialog("setTitle", "编辑商品信息"); $("#ff").form("load", row); url = "${pageContext.request.contextPath}/ProductServlet?method=Edit_P&pid=" + row.pid; } //保存 function save() { $("#ff").form("submit", { url : url, success : function(result) { if (result.errorMsg) { $.messager.alert("系统提示", result.errorMsg); return; } else { $.messager.alert("系统提示", "保存成功"); $("#w").dialog("close"); $("#dg").datagrid("reload"); } } }); } //update public String Edit_P(HttpServletRequest req, HttpServletResponse resp) throws SQLException, IOException { Product p = MyBeanUtils.populate(Product.class, req.getParameterMap()); ProductService productService = new ProductServiceImpl(); productService.edit(p); return "/admin/product/list.jsp"; } ``` ```

Spring Security OAuth2

在使用Spring Security OAuth2测试时,授权之后报错: Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Wed Dec 20 16:14:18 CST 2017 There was an unexpected error (type=Unauthorized, status=401). Authentication Failed: Could not obtain user details from token 客户端DEBUG信息: 2017-12-20 16:14:17.948 DEBUG 7932 --- [nio-8082-exec-4] o.s.s.oauth2.client.OAuth2RestTemplate : Created GET request for "http://localhost:8081/resource/user" 2017-12-20 16:14:17.967 DEBUG 7932 --- [nio-8082-exec-4] o.s.s.oauth2.client.OAuth2RestTemplate : Setting request Accept header to [application/json, application/*+json] 2017-12-20 16:14:18.204 DEBUG 7932 --- [nio-8082-exec-4] o.s.s.oauth2.client.OAuth2RestTemplate : GET request for "http://localhost:8081/resource/user" resulted in 401 (null); invoking error handler 2017-12-20 16:14:18.213 WARN 7932 --- [nio-8082-exec-4] o.s.b.a.s.o.r.UserInfoTokenServices : Could not fetch user details: class org.springframework.security.oauth2.common.exceptions.InvalidRequestException, Possible CSRF detected - state parameter was required but no state could be found 2017-12-20 16:14:18.280 DEBUG 7932 --- [nio-8082-exec-4] uth2ClientAuthenticationProcessingFilter : Authentication request failed: org.springframework.security.authentication.BadCredentialsException: Could not obtain user details from token 认证服务器DEBUG信息: 2017-12-20 16:14:08.230 DEBUG 8704 --- [nio-8080-exec-7] o.s.s.w.a.i.FilterSecurityInterceptor : Secure object: FilterInvocation: URL: /favicon.ico; Attributes: [authenticated] 2017-12-20 16:14:08.230 DEBUG 8704 --- [nio-8080-exec-7] o.s.s.w.a.i.FilterSecurityInterceptor : Previously Authenticated: org.springframework.security.authentication.AnonymousAuthenticationToken@6fa90ed4: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@fffc7f0c: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: 41D379AFB367FD4316A06BAC18AB91DA; Granted Authorities: ROLE_ANONYMOUS 2017-12-20 16:14:08.230 DEBUG 8704 --- [nio-8080-exec-7] o.s.s.access.vote.AffirmativeBased : Voter: org.springframework.security.web.access.expression.WebExpressionVoter@72127537, returned: -1 2017-12-20 16:14:08.231 DEBUG 8704 --- [nio-8080-exec-7] o.s.s.w.a.ExceptionTranslationFilter : Access is denied (user is anonymous); redirecting to authentication entry point 资源服务器DEBUG信息: 2017-12-20 16:14:18.132 DEBUG 10100 --- [nio-8081-exec-1] o.s.security.web.FilterChainProxy : /user at position 5 of 11 in additional filter chain; firing Filter: 'OAuth2AuthenticationProcessingFilter' 2017-12-20 16:14:18.137 DEBUG 10100 --- [nio-8081-exec-1] p.a.OAuth2AuthenticationProcessingFilter : Authentication request failed: error="invalid_token", error_description="Invalid access token: fbde02a4-d6b9-41c8-a8aa-332390482c1e" 2017-12-20 16:14:18.192 DEBUG 10100 --- [nio-8081-exec-1] w.c.HttpSessionSecurityContextRepository : SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession. 2017-12-20 16:14:18.199 DEBUG 10100 --- [nio-8081-exec-1] s.s.o.p.e.DefaultOAuth2ExceptionRenderer : Written [error="invalid_token", error_description="Invalid access token: fbde02a4-d6b9-41c8-a8aa-332390482c1e"] as "application/json;charset=UTF-8" using [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@74bcb39b] 2017-12-20 16:14:18.200 DEBUG 10100 --- [nio-8081-exec-1] s.s.w.c.SecurityContextPersistenceFilter : SecurityContextHolder now cleared, as request processing completed 网上找了很久都没有解决,有研究过的大神指教一下

基于springboot实现security-oauth2.0客户端模式token验证?

项目是基于spring springboot去实现的。现在要利用security-oauth2.0去实现token验证 以免其他人随意调用,基本拦截配置已经完成了。但是token怎么生成呢?怎么去写token 的这个接口呢?本人是新手不是很熟悉,试着很多相关demo,也看了官方文档,但是还是 懵懂状态,希望大神能给个详细的解释,能给一个例子就更好了,谢谢了

springboot security 静态资源一直访问不到

1、拦截器 ![图片说明](https://img-ask.csdn.net/upload/201903/28/1553740242_710046.png) 2、token验证 ![图片说明](https://img-ask.csdn.net/upload/201903/28/1553740289_716719.png) 3、静态资源位置 ![图片说明](https://img-ask.csdn.net/upload/201903/28/1553740373_565024.png) 4、报错信息 ![图片说明](https://img-ask.csdn.net/upload/201903/28/1553740488_736144.png) 现在问题:页面访问一直得不到js

springboot oauth2.0 实现token的Authentication 验证?

项目基于spring springboot,利用oauth2去实现一个token的Authentication 验证,采取 clientcredetails,利用clientid clientsecret还有grant_type=clientcredetails去请求 oauth/token,那么这里面的clientID和clientSecret是怎么来的呢,是由后端去随机生成的吗,如果是这样的话,需要怎么做呢?如果不是,那他是怎么生成的呢?也是有Authentication 的接口去生成的吗?本人刚刚接触不是很懂希望大神指教一下,麻烦不要推荐文章,因为看了很多,现在自己有点迷茫,希望大神能借助自己的语言帮忙解答一下小弟的问题,谢谢了!

做服务器端OAuth2,引用了客户端的相关jar该怎么配置?或者说能否同时使用@EnableOAuth2Sso和@EnableAuthorizationServer

做服务器端OAuth2,引用了客户端的相关jar 会报错: Description: Method springSecurityFilterChain in org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration required a bean of type 'org.springframework.boot.autoconfigure.security.oauth2.resource.UserInfoRestTemplateFactory' that could not be found. The following candidates were found but could not be injected: - Bean method 'userInfoRestTemplateFactory' in 'ResourceServerTokenServicesConfiguration' not loaded because @ConditionalOnBean (types: org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerEndpointsConfiguration; SearchStrategy: all) found beans of type 'org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerEndpointsConfiguration' org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerEndpointsConfiguration Action: Consider revisiting the entries above or defining a bean of type 'org.springframework.boot.autoconfigure.security.oauth2.resource.UserInfoRestTemplateFactory' in your configuration.

spring security和spring oauth结合后 spring security配置不管用了

> spring security ``` @Configuration @EnableResourceServer public class AppWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter { @Autowired private ZuulProperties zuulProperties; @Autowired private AuthenticationSuccessHandler appAuthenticationSuccessHandler; @Autowired private AuthenticationFailureHandler appAuthenticationFailureHandler; @Autowired private AccessDeniedHandler appAccessDeniedHandler; @Bean @Override public AuthenticationManager authenticationManagerBean() throws Exception { AuthenticationManager manager = super.authenticationManagerBean(); return manager; } @Override protected void configure(HttpSecurity http) throws Exception { http .authorizeRequests() .antMatchers(HttpMethod.GET,zuulProperties.getAuth().toGetAdapter()) .permitAll() .and() .authorizeRequests() .antMatchers(HttpMethod.POST,zuulProperties.getAuth().toPostAdapter()) .permitAll() .and() .authorizeRequests() .anyRequest() .authenticated() .and() .exceptionHandling().accessDeniedHandler(appAccessDeniedHandler) .and() .csrf().disable(); } ``` > spring oauth相关 ``` @Configuration @EnableAuthorizationServer public class AppAuthorizationServerConfig extends AuthorizationServerConfigurerAdapter { @Autowired private final AuthenticationManager authenticationManager; @Autowired private UserDetailsService userDetailsService; @Autowired private ZuulProperties zuulProperties; @Autowired private TokenStore tokenStore ; @Autowired(required = false) private JwtAccessTokenConverter jwtAccessTokenConverter; @Autowired(required = false) private TokenEnhancer jwtTokenEnhancer; @Autowired private PasswordEncoder passwordEncoder; public AppAuthorizationServerConfig(AuthenticationManager authenticationManager) { this.authenticationManager = authenticationManager; } @Override public void configure(ClientDetailsServiceConfigurer clients) throws Exception { InMemoryClientDetailsServiceBuilder builder = clients.inMemory(); OAuth2ClientProperties[] clientProperties = zuulProperties.getOauth().getClients(); if(ArrayUtils.isNotEmpty(zuulProperties.getOauth().getClients())) { for (OAuth2ClientProperties oAuth2ClientProperties : clientProperties) { builder.withClient(oAuth2ClientProperties.getClientId()) .secret(oAuth2ClientProperties.getClientSecret()) //token有效时间 .accessTokenValiditySeconds(oAuth2ClientProperties.getAccessTokenValiditySeconds()) //验证模式 .authorizedGrantTypes("password","authorization_code","client_credentials","implicit","refresh_token") //刷新时间 .refreshTokenValiditySeconds(3600*24*100) //跳转地址 .redirectUris("ws.28ph.cn") //权限 .scopes("all"); } } } @Override public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception { endpoints.authenticationManager(authenticationManager) .tokenStore(tokenStore) .userDetailsService(userDetailsService) .reuseRefreshTokens(true); if(jwtAccessTokenConverter != null && jwtTokenEnhancer!=null) { TokenEnhancerChain enhancerChain = new TokenEnhancerChain(); List<TokenEnhancer> tokenEnhancers = new ArrayList<>(); tokenEnhancers.add(jwtTokenEnhancer); tokenEnhancers.add(jwtAccessTokenConverter); enhancerChain.setTokenEnhancers(tokenEnhancers); endpoints .tokenEnhancer(enhancerChain) .accessTokenConverter(jwtAccessTokenConverter); } } @Override public void configure(AuthorizationServerSecurityConfigurer security) throws Exception { security.allowFormAuthenticationForClients() .passwordEncoder(passwordEncoder) .tokenKeyAccess("permitAll()") .checkTokenAccess("isAuthenticated()"); } } ``` 问题的产生:我在spring security配置了几个不需要拦截的uri,但是加入spring oauth 全部被拦截了,如果删掉@EnableResourceServer会出现 发出来的token 认证不了url的问题。。 然后我想大不了不用spring oauth 自带的发token方式。然后我在spring security的成功handler上下发token ,以下是代码 ``` /** * 认证成功跳转 * @author w4837 * */ @Component(value = "AppAuthenticationSuccessHandler") @Slf4j public class AppAuthenticationSuccessHandler extends SavedRequestAwareAuthenticationSuccessHandler { @Autowired private ObjectMapper objectMapper; @Autowired private ClientDetailsService clientDetailsService; @Autowired private AuthorizationServerTokenServices authorizationServerTokenServices; @Override public void onAuthenticationSuccess(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Authentication authentication) throws IOException, ServletException { log.info("登陆成功"); String header = httpServletRequest.getHeader("Authorization"); //请求头包含Authorization 并且以"Basic "开始 if (header == null || !header.startsWith("Basic ")) { throw new UnapprovedClientAuthenticationException("请求头中无Authorization信息"); } try { String[] tokens = extractAndDecodeHeader(header, httpServletRequest); assert tokens.length == 2; String clientId = tokens[0]; String clientSecret = tokens[1]; ClientDetails clientDetails = clientDetailsService.loadClientByClientId(clientId); if(clientDetails == null) { throw new UnapprovedClientAuthenticationException("clientId:"+clientId+"对应的信息不存在。"); }else if(!StringUtils.equals(clientSecret, clientDetails.getClientSecret())) { throw new UnapprovedClientAuthenticationException("clientId:"+clientId+"对应的信息不匹配。"); } @SuppressWarnings("unchecked") TokenRequest tokenRequest = new TokenRequest(MapUtils.EMPTY_MAP, clientId, clientDetails.getScope(),"custom"); OAuth2Request auth2Request = tokenRequest.createOAuth2Request(clientDetails); OAuth2Authentication auth2Authentication = new OAuth2Authentication(auth2Request, authentication); OAuth2AccessToken createAccessToken = authorizationServerTokenServices.createAccessToken(auth2Authentication); // 判断需要的返回类型 httpServletResponse.setContentType(ZuulAppConstant.CONTENT_TYPE_JSON); httpServletResponse.getWriter().write(objectMapper.writeValueAsString(createAccessToken)); } catch (Exception e) { log.error(e.getMessage()); } } /** * 解析header中编码后的数据 * * @param header * @param request * @return * @throws IOException */ private String[] extractAndDecodeHeader(String header, HttpServletRequest request) throws IOException { byte[] base64Token = header.substring(6).getBytes("UTF-8"); byte[] decoded; try { decoded = Base64.decode(base64Token); } catch (IllegalArgumentException e) { throw new BadCredentialsException("Failed to decode basic authentication token"); } String token = new String(decoded, "UTF-8"); int delim = token.indexOf(":"); if (delim == -1) { throw new BadCredentialsException("Invalid basic authentication token"); } return new String[] { token.substring(0, delim), token.substring(delim + 1) }; } ``` 结果 启动还是报循环依赖的错误 ``` *************************** APPLICATION FAILED TO START *************************** Description: The dependencies of some of the beans in the application context form a cycle: ┌─────┐ | appAuthorizationServerConfig defined in file [F:\yulece_aike_ideaword\app-management\app-management-zuul\target\classes\com\yulece\app\management\zuul\authorization\AppAuthorizationServerConfig.class] ↑ ↓ | appWebSecurityConfigurerAdapter (field private org.springframework.security.web.authentication.AuthenticationSuccessHandler com.yulece.app.management.zuul.authorization.AppWebSecurityConfigurerAdapter.appAuthenticationSuccessHandler) ↑ ↓ | AppAuthenticationSuccessHandler (field private org.springframework.security.oauth2.provider.token.AuthorizationServerTokenServices com.yulece.app.management.zuul.authorization.handler.AppAuthenticationSuccessHandler.defaultAuthorizationServerTokenServices) ↑ ↓ | org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerEndpointsConfiguration (field private java.util.List org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerEndpointsConfiguration.configurers) └─────┘ ```

单点登录中 客户端登录认证中心后返回资源页报错500

HTTP Status 500 - Unable to create XMLReader type Exception report message Unable to create XMLReader description The server encountered an internal error that prevented it from fulfilling this request. exception java.lang.RuntimeException: Unable to create XMLReader org.jasig.cas.client.util.XmlUtils.getXmlReader(XmlUtils.java:58) org.jasig.cas.client.util.XmlUtils.getTextForElement(XmlUtils.java:130) org.jasig.cas.client.validation.Cas20ServiceTicketValidator.parseResponseFromServer(Cas20ServiceTicketValidator.java:82) org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator.validate(AbstractUrlBasedTicketValidator.java:217) org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:169) org.jasig.cas.client.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:116) org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:76) root cause org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:230) org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:191) org.jasig.cas.client.util.XmlUtils.getXmlReader(XmlUtils.java:56) org.jasig.cas.client.util.XmlUtils.getTextForElement(XmlUtils.java:130) org.jasig.cas.client.validation.Cas20ServiceTicketValidator.parseResponseFromServer(Cas20ServiceTicketValidator.java:82) org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator.validate(AbstractUrlBasedTicketValidator.java:217) org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:169) org.jasig.cas.client.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:116) org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:76) root cause java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333) org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167) org.xml.sax.helpers.NewInstance.newInstance(NewInstance.java:82) org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:228) org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:191) org.jasig.cas.client.util.XmlUtils.getXmlReader(XmlUtils.java:56) org.jasig.cas.client.util.XmlUtils.getTextForElement(XmlUtils.java:130) org.jasig.cas.client.validation.Cas20ServiceTicketValidator.parseResponseFromServer(Cas20ServiceTicketValidator.java:82) org.jasig.cas.client.validation.AbstractUrlBasedTicketValidator.validate(AbstractUrlBasedTicketValidator.java:217) org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:169) org.jasig.cas.client.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:116) org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:76) note The full stack trace of the root cause is available in the Apache Tomcat/8.0.30 logs.

关于spring Security OAuth2 生成Token和Jwt的问题

![图片说明](https://img-ask.csdn.net/upload/201805/29/1527563054_268262.png) 途中要求生成token和jwt,然后通过token换取jwt,求大神告知如何操作,最好有个demo,

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

Linux 会成为主流桌面操作系统吗?

整理 |屠敏出品 | CSDN(ID:CSDNnews)2020 年 1 月 14 日,微软正式停止了 Windows 7 系统的扩展支持,这意味着服役十年的 Windows 7,属于...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

学习总结之HTML5剑指前端(建议收藏,图文并茂)

前言学习《HTML5与CSS3权威指南》这本书很不错,学完之后我颇有感触,觉得web的世界开明了许多。这本书是需要有一定基础的web前端开发工程师。这本书主要学习HTML5和css3,看...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

搜狗输入法也在挑战国人的智商!

故事总是一个接着一个到来...上周写完《鲁大师已经彻底沦为一款垃圾流氓软件!》这篇文章之后,鲁大师的市场工作人员就找到了我,希望把这篇文章删除掉。经过一番沟通我先把这篇文章从公号中删除了...

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

新一代神器STM32CubeMonitor介绍、下载、安装和使用教程

关注、星标公众号,不错过精彩内容作者:黄工公众号:strongerHuang最近ST官网悄悄新上线了一款比较强大的工具:STM32CubeMonitor V1.0.0。经过我研究和使用之...

记一次腾讯面试,我挂在了最熟悉不过的队列上……

腾讯后台面试,面试官问:如何自己实现队列?

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

冒泡排序动画(基于python pygame实现)

本项目效果初始截图如下 动画见本人b站投稿:https://www.bilibili.com/video/av95491382 本项目对应github地址:https://github.com/BigShuang python版本:3.6,pygame版本:1.9.3。(python版本一致应该就没什么问题) 样例gif如下 ======================= 大爽歌作,mad

Redis核心原理与应用实践

Redis核心原理与应用实践 在很多场景下都会使用Redis,但是到了深层次的时候就了解的不是那么深刻,以至于在面试的时候经常会遇到卡壳的现象,学习知识要做到系统和深入,不要把Redis想象的过于复杂,和Mysql一样,是个读取数据的软件。 有一个理解是Redis是key value缓存服务器,更多的优点在于对value的操作更加丰富。 安装 yum install redis #yum安装 b...

现代的 “Hello, World”,可不仅仅是几行代码而已

作者 |Charles R. Martin译者 | 弯月,责编 | 夕颜头图 |付费下载自视觉中国出品 | CSDN(ID:CSDNnews)新手...

带了6个月的徒弟当了面试官,而身为高级工程师的我天天修Bug......

即将毕业的应届毕业生一枚,现在只拿到了两家offer,但最近听到一些消息,其中一个offer,我这个组据说客户很少,很有可能整组被裁掉。 想问大家: 如果我刚入职这个组就被裁了怎么办呢? 大家都是什么时候知道自己要被裁了的? 面试软技能指导: BQ/Project/Resume 试听内容: 除了刷题,还有哪些技能是拿到offer不可或缺的要素 如何提升面试软实力:简历, 行为面试,沟通能...

!大部分程序员只会写3年代码

如果世界上都是这种不思进取的软件公司,那别说大部分程序员只会写 3 年代码,恐怕就没有程序员这种职业。

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

2020阿里全球数学大赛:3万名高手、4道题、2天2夜未交卷

阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

HTTP与HTTPS的区别

面试官问HTTP与HTTPS的区别,我这样回答让他竖起大拇指!

程序员毕业去大公司好还是小公司好?

虽然大公司并不是人人都能进,但我仍建议还未毕业的同学,尽力地通过校招向大公司挤,但凡挤进去,你这一生会容易很多。 大公司哪里好?没能进大公司怎么办?答案都在这里了,记得帮我点赞哦。 目录: 技术氛围 内部晋升与跳槽 啥也没学会,公司倒闭了? 不同的人脉圈,注定会有不同的结果 没能去大厂怎么办? 一、技术氛围 纵观整个程序员技术领域,哪个在行业有所名气的大牛,不是在大厂? 而且众所...

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

程序员为什么千万不要瞎努力?

本文作者用对比非常鲜明的两个开发团队的故事,讲解了敏捷开发之道 —— 如果你的团队缺乏统一标准的环境,那么即使勤劳努力,不仅会极其耗时而且成果甚微,使用...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

立即提问
相关内容推荐