title: How can Config HDIV in Spring boot
body: <p>I want to secure my links (restful address). so after many research i found <code>HDIV framework</code> and gone use it.
  Now i want to config <code>HDIV framework</code> in Spring-boot but it has some error!! and i couldn't config this. any who Could help me?</p>
  
  <p>my POM.xml:</p>
  
  <pre><code>    &lt;dependency&gt;
                  &lt;groupId&gt;org.apache.tomcat.embed&lt;/groupId&gt;
                  &lt;artifactId&gt;tomcat-embed-jasper&lt;/artifactId&gt;
                  &lt;scope&gt;provided&lt;/scope&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.apache.tomcat.embed&lt;/groupId&gt;
                  &lt;artifactId&gt;tomcat-embed-el&lt;/artifactId&gt;
                  &lt;scope&gt;provided&lt;/scope&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
                  &lt;artifactId&gt;jstl&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.company&lt;/groupId&gt;
                  &lt;artifactId&gt;framework-boot&lt;/artifactId&gt;
                  &lt;version&gt;1.0.0-releases&lt;/version&gt;
                  &lt;type&gt;jar&lt;/type&gt;
                  &lt;exclusions&gt;
                      &lt;exclusion&gt;
                          &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
                          &lt;artifactId&gt;spring-security-core&lt;/artifactId&gt;
                      &lt;/exclusion&gt;
                      &lt;exclusion&gt;
                          &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
                          &lt;artifactId&gt;spring-security-config&lt;/artifactId&gt;
                      &lt;/exclusion&gt;
                      &lt;exclusion&gt;
                                   &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
                              &lt;artifactId&gt;spring-security-web&lt;/artifactId&gt;
                      &lt;/exclusion&gt;
                      &lt;exclusion&gt;
                          &lt;groupId&gt;org.company&lt;/groupId&gt;
                          &lt;artifactId&gt;font&lt;/artifactId&gt;
                      &lt;/exclusion&gt;
                  &lt;/exclusions&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
                  &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.company&lt;/groupId&gt;
                  &lt;artifactId&gt;framework-web-new&lt;/artifactId&gt;
                  &lt;version&gt;2.0.0-releases&lt;/version&gt;
                  &lt;type&gt;jar&lt;/type&gt;
              &lt;/dependency&gt;
  
  
  
              &lt;!-- &lt;HDIV&gt;&lt;/HDIV&gt; --&gt;
  
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-security-core&lt;/artifactId&gt;
                  &lt;version&gt;4.1.1.RELEASE&lt;/version&gt;
                  &lt;exclusions&gt;
                      &lt;exclusion&gt;
                          &lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
                          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                      &lt;/exclusion&gt;
                  &lt;/exclusions&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-security-config&lt;/artifactId&gt;
                  &lt;version&gt;4.1.1.RELEASE&lt;/version&gt;
                  &lt;exclusions&gt;
                      &lt;exclusion&gt;
                          &lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
                          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                      &lt;/exclusion&gt;
                  &lt;/exclusions&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-security-web&lt;/artifactId&gt;
                  &lt;version&gt;4.1.1.RELEASE&lt;/version&gt;
                  &lt;exclusions&gt;
                      &lt;exclusion&gt;
                          &lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
                          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                      &lt;/exclusion&gt;
                  &lt;/exclusions&gt;
              &lt;/dependency&gt;
  
  
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.hdiv&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-starter-hdiv&lt;/artifactId&gt;
                  &lt;version&gt;1.0.0&lt;/version&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;org.hdiv&lt;/groupId&gt;
                  &lt;artifactId&gt;hdiv-config&lt;/artifactId&gt;
                  &lt;version&gt;3.2.0&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.hdiv&lt;/groupId&gt;
                  &lt;artifactId&gt;hdiv-spring-mvc&lt;/artifactId&gt;
                  &lt;version&gt;3.2.0&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.hdiv&lt;/groupId&gt;
                  &lt;artifactId&gt;hdiv-core&lt;/artifactId&gt;
                  &lt;version&gt;3.2.0&lt;/version&gt;
              &lt;/dependency&gt;
  </code></pre>
  
  <p>and my configuration Class is:</p>
  
  <pre><code>@Configuration
  @EnableHdivWebSecurity
  
  public class MyHdivConfig extends HdivWebSecurityConfigurerAdapter {
  
  
  @Override
  public void configure(SecurityConfigBuilder builder) {
  
      builder.maxPagesPerSession(1)
      .randomName(true)
      .showErrorPageOnEditableValidation(true)
      .stateParameterName("mohsen")
      .validateUrlsWithoutParams(true)
  
  
      .sessionExpired()
              .homePage("/").loginPage("/Login.jsp")
  
  
              .and()
              .reuseExistingPageInAjaxRequest(true)
              ;
  }
  
  
  //  First Page
      @Override
      public void addExclusions(ExclusionRegistry registry) {
  
      registry.addUrlExclusions("/Login.jsp").method("GET");
  }
  
  
  
  //EditableValidation
  @Override
  public void addRules(RuleRegistry registry) {
  
      registry.addRule("customValidation").acceptedPattern("^[a-zA-Z0-9@.\\-_]*$");
  }
  
  @Override
  public void configureEditableValidation(ValidationConfigurer validationConfigurer) {
  
      validationConfigurer.addValidation(".*").rules("customValidation");
  }
  </code></pre>
  
  <p>but i have many Error's that those are:</p>
  
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hdivConfig' defined in class path resource [org/hdiv/config/annotation/DelegatingHdivWebSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.hdiv.config.HDIVConfig]: Factory method 'hdivConfig' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'editableDataValidationProvider' defined in class path resource [org/hdiv/config/annotation/DelegatingHdivWebSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.hdiv.validator.EditableDataValidationProvider]: Factory method 'editableDataValidationProvider' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'editableValidationRepository' defined in class path resource [org/hdiv/config/annotation/DelegatingHdivWebSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.hdiv.validator.ValidationRepository]: Factory method 'editableValidationRepository' threw exception; nested exception is java.lang.NoSuchMethodError: org.hdiv.config.annotation.ValidationConfigurer.addValidation(Ljava/lang/String;)Lorg/hdiv/config/annotation/ValidationConfigurer$ValidationConfig$RuleConfigurer;
  at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1128)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1023)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:751)
  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
  at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
  at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
  at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)
  at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
  at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
  at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
  at org.baharan.Application.main(Application.java:48)
  aused by: java.lang.NoSuchMethodError: org.hdiv.config.annotation.ValidationConfigurer.addValidation(Ljava/lang/String;)Lorg/hdiv/config/annotation/ValidationConfigurer$ValidationConfig$RuleConfigurer;
  at org.hdiv.spring.boot.autoconfigure.HdivAutoConfiguration$HdivDefaultConfiguration.configureEditableValidation(HdivAutoConfiguration.java:93)
  at org.hdiv.config.annotation.configuration.HdivWebSecurityConfigurerComposite.configureEditableValidation(HdivWebSecurityConfigurerComposite.java:66)
  at org.hdiv.config.annotation.DelegatingHdivWebSecurityConfiguration.configureEditableValidation(DelegatingHdivWebSecurityConfiguration.java:82)
  at org.hdiv.config.annotation.AbstractHdivWebSecurityConfiguration.getValidationsData(AbstractHdivWebSecurityConfiguration.java:416)
  at org.hdiv.config.annotation.AbstractHdivWebSecurityConfiguration.editableValidationRepository(AbstractHdivWebSecurityConfiguration.java:369)
  at org.hdiv.config.annotation.DelegatingHdivWebSecurityConfiguration$$EnhancerBySpringCGLIB$$61ea94d.CGLIB$editableValidationRepository$34(&lt;generated&gt;)
  at org.hdiv.config.annotation.DelegatingHdivWebSecurityConfiguration$$EnhancerBySpringCGLIB$$61ea94d$$FastClassBySpringCGLIB$$3c036c14.invoke(&lt;generated&gt;)
  at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
  at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
  at org.hdiv.config.annotation.DelegatingHdivWebSecurityConfiguration$$EnhancerBySpringCGLIB$$61ea94d.editableValidationRepository(&lt;generated&gt;)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:497)
  at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
  ... 63 common frames omitted
  </code></pre>
  
  <p>thanks for your help.</p>