Compress and merge js in pom.xml and then replace js file in jsp to report an error

when I replace the js file, the src address of js I want to add ${pageContext.request.contextPath} to the red box, but I will error: Failed to execute goal com.google.code.maven-replacer-plugin:replacer:1.5.2:replace (default) on project mission: named capturing group is missing trailing"}"- > [Help 1] say one less}, but I don"t know where it is missing! The figure is as follows

Mar.15,2021

$has a special purpose in the configuration file, and needs to be escaped when using it

change it to src= "/ static/js/testjs/$ {'$'} 1" try

EDITED

 src="${'$'}{pageContext.request.contextPath}/static/js/testjs/${'$'}1">

& dollar; {pageContext.request.contextPath} escape this paragraph to ok

Menu