title: Spring Boot application not working properly after changing package name
body: <p>I am trying to apply JWT authentication in my Spring Boot application. I am using maven. After searching in the internet i have found some examples. I have cloned them and run in Netbean IDE. They are working well. Now i wanna apply them into my project. Rather coding again i want to use them on top my application.</p>
  
  <p>I have given two github links of the projects that i am following.</p>
  
  <p><a href="https://github.com/aboullaite/spring-boot-jwt" rel="nofollow noreferrer">Project One</a></p>
  
  <p><a href="https://github.com/szerhusenBC/jwt-spring-security-demo" rel="nofollow noreferrer">Project Two</a></p>
  
  <p>I have copied the classes and inserted into my project with different package name. Problem is when i am keeping them in some other named package, rather their default package name, in time of clone, they are not working. No error is showing in compile time, application is starting. But in the console, i have noticed no request is being mapped. If strictly maintain their package name then only the request is being mapped. Different "package name," mean an entirely new package with no relation to the root of my project's current package or their default package name. And if i start my project with their default package name, then i am facing second problem.</p>
  
  <p>Second problem, in the cloned project if i want to map new requests in new class, then i had to put the controller inside the controller package of the project. If i am putting them in another package then requests are not being mapped. I have used <code>@ComponentScan(basePackageClasses = NewClass.class)</code>, but result is same. </p>
  
  <p>Now what is the reason?</p>