title: How to get parameter which is containing dot(.) from rest url in spring
body: <p>I am creating a web application using Spring REST and hibernate. Here i am fetching record from database using unique username which is coming from url.
  But the problem is that if i am writing simple string then it is working fine but when in username i am writing dot(.) then no result is coming from database.</p>
  
  <p>For ex.</p>
  
  <pre><code>http://localhost:8080/WhoToSubscribe/subscribe/anshul007
  </code></pre>
  
  <p>but when i am using this url </p>
  
  <pre><code>http://localhost:8080/WhoToSubscribe/subscribe/nadeem.ahmad095
  </code></pre>
  
  <p>it is not working because it is containing dot(.)</p>
  
  <p>Here is my <strong>controller</strong></p>
  
  <pre><code>@RequestMapping(value = "/{uname}", method = RequestMethod.GET)
  public @ResponseBody
  List&lt;Profession&gt; getSubscriber(@PathVariable("uname") String uname) {
  
      List&lt;Profession&gt; pro = null;
  
      try {
          pro = subscribeService.getProfessionById(uname);
  
  
      } catch (Exception e) {
          e.printStackTrace();
      }
  
      return pro;
  }
  </code></pre>
  
  <p>Here is my <strong>DAO</strong> class</p>
  
  <pre><code>@SuppressWarnings("unchecked")
  public List&lt;Profession&gt; getProfessionById(String uname) throws Exception {
  session = sessionFactory.openSession();
    session.beginTransaction();
    String queryString = "from Profession where username = :uname";
    Query query = session.createQuery(queryString);
    query.setString("uname", uname);
    //List&lt;Profession&gt; queryResult = (List&lt;Profession&gt;) query.uniqueResult();
    session.getTransaction().commit();
    return query.list();
  }
  </code></pre>