package de.gdv.sp.configuration;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.captcha.botdetect.web.servlet.CaptchaServlet;
@Configuration
public class CaptchaConfiguration {
@Bean(name = "captchaServlet")
public ServletRegistrationBean captchaServlet() {
return new ServletRegistrationBean(new CaptchaServlet(), "/kontakt");
}
}
我想實現BotDetect驗證碼在我們的Spring MVC /啓動project.When我試圖創建與批註(不web.xml)中的servlet我總是得到如下畫面:screenshot of http://localhost:8080/kontakt未知命令-Spring MVC
此外,當我編寫此驗證碼的HTML代碼時,我得到以下結果。 Botdetect Captcha does not show picture
<botDetect:captcha id="exampleCaptcha"/>
<div class="validationDiv">
<input id="captchaCode" type="text" name="captchaCode"
value="${basicExample.captchaCode}"/>
<input type="submit" name="submit" value="Submit" />
<span class="correct">${basicExample.captchaCorrect}</span>
<span class="incorrect">${basicExample.captchaIncorrect}</span>
</div>
我怎樣才能解決這個問題?
[BotDetect驗證碼網站] [3]