JAX-RS @PathParam Cannot resolve symbol for parameter with a regex

Answered

If a @Path has a regex in it, IntelliJ is marking them as being unresolved in the @PathParam's

 

Minimal example which does compile fine:

package com.whatever
import javax.ws.rs.*;

@Path("/test")
public class Example {

@GET
@Path("/{param1}")
public void getGood(
@PathParam("param1") String param1
) {

}

@GET
@Path("/{param1:.+}")
public void getBad(
@PathParam("param1") String param1
) {

}

}


1

Please sign in to leave a comment.