I am trying to add the swagger in my project and getting this error
2024-06-03T16:01:55.361+05:30 INFO 38783 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2024-06-03T16:01:55.361+05:30 INFO 38783 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2024-06-03T16:01:55.362+05:30 INFO 38783 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms
2024-06-03T16:01:55.764+05:30 ERROR 38783 --- [nio-8080-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed: java.lang.NoSuchMethodError: 'boolean org.apache.commons.lang3.StringUtils.containsAny(java.lang.CharSequence, java.lang.CharSequence[])'] with root cause
java.lang.NoSuchMethodError: 'boolean org.apache.commons.lang3.StringUtils.containsAny(java.lang.CharSequence, java.lang.CharSequence[])'
at org.springdoc.api.AbstractOpenApiResource.buildPathItem(AbstractOpenApiResource.java:1102) ~[springdoc-openapi-starter-common-2.1.0.jar:2.1.0]
The dependencies i am using are
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation group: 'org.springdoc', name: 'springdoc-openapi-starter-webmvc-ui', version: '2.1.0'
same dependencies i am added in other projects then it’s working fine but not for the new project that i build
Trying to add the swagger doc to my spring boot (gradle) project
New contributor
Ùtkårsh Thãkûr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.