title: Spring boot Consider defining a bean named 'servletContext' in your configuration
body: <p>I have a project with several modules , and it's tomcat project.I need to convert to spring boot project.</p>
  
  <p>Here is a xml file with follow bean : 
  
      
          
          
          
              
                  
                  
                  
                  
                  
                  
                  
              
          
          
              
                  
                      
                  
                  
                      
                  
                  
                      
                  
              
          
      
  I have used @ImportResource("classpath:xxx.xml").</p>
  
  <p>Here throws exception:</p>
  
  <hr>
  
  <p>APPLICATION FAILED TO START</p>
  
  <hr>
  
  <p>Description:</p>
  
  <p>Parameter 0 of constructor in xxxService required a bean named 'servletContext' that could not be found.</p>
  
  <p>Action:</p>
  
  <p>Consider defining a bean named 'servletContext' in your configuration.</p>
  
  <p>I have no idea about this problems almost three days. Please help me if you have any experiences about this, thanks a lot !</p>