title: Do I need to manually set authenticationManager in spring?
body: <p>After loading ApplicationContext I got a warning like this: </p>
  
  <p><strong>_ INFO: No authentication manager set. Reauthentication of users when changing passwords will not be performed. _</strong>  </p>
  
  <p>My Context.XML file is like this: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:aop="http://www.springframework.org/schema/aop" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx"
  xmlns:sec="http://www.springframework.org/schema/security"
  xsi:schemaLocation="http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
   http://www.springframework.org/schema/tx
   http://www.springframework.org/schema/tx/spring-tx-3.0.6.xsd
   http://www.springframework.org/schema/security
   http://www.springframework.org/schema/security/spring-security-3.1.xsd
   http://www.springframework.org/schema/aop
   http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"&gt;
  
  
  &lt;!-- =============== Security =============== --&gt;
  &lt;sec:method-security-metadata-source
      id="method-security-metadata-source"&gt;
      &lt;sec:protect access="MyAccess"
          method="springsecuritytest._00_base.AuthenticationTester.*" /&gt;
  &lt;/sec:method-security-metadata-source&gt;
  
  
  &lt;sec:global-method-security
      access-decision-manager-ref="accessDecisionManager"
      secured-annotations="enabled" pre-post-annotations="enabled"
      proxy-target-class="true"&gt;
      &lt;sec:protect-pointcut
          expression="execution(* springsecuritytest._00_base.AuthenticationTester.*(..))"
          access="ROLE_USER_BASIC_099" /&gt;
      &lt;!-- &lt;sec:protect-pointcut access="ROLE_USER_BASIC_099" expression="execution(*
          springsecuritytest._00_base.AuthenticationTester.* (..))" /&gt; --&gt;
  &lt;/sec:global-method-security&gt;
  
  &lt;sec:authentication-manager alias="authenticationManager"
      erase-credentials="true"&gt;
      &lt;sec:authentication-provider&gt;
          &lt;sec:jdbc-user-service data-source-ref="dataSource" /&gt;
          &lt;!-- role-prefix="ROLE_" /&gt; --&gt;
      &lt;/sec:authentication-provider&gt;
  &lt;/sec:authentication-manager&gt;
  
  &lt;bean id="accessDecisionManager" class="org.springframework.security.access.vote.UnanimousBased"&gt;
      &lt;property name="decisionVoters"&gt;
          &lt;list&gt;
              &lt;bean class="org.springframework.security.access.vote.RoleVoter" /&gt;
              &lt;!-- &lt;bean class="org.springframework.security.access.vote.AuthenticatedVoter"/&gt; --&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="dataSource"
      class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
      &lt;property name="driverClassName" value="com.mysql.jdbc.Driver" /&gt;
      &lt;property name="url" value="jdbc:mysql://localhost:3306/spring_security" /&gt;
      &lt;property name="username" value="root" /&gt;
      &lt;property name="password" value="" /&gt;
  &lt;/bean&gt;    
  </code></pre>
  
  <p>any body can help me?</p>