tiagocarvalho92
tiagocarvalho92

Reputation: 427

Jersey endpoint not found

I have two endpoints in my Java Jersey web service:

Due to some problem with other systems i need to add a regex to validate the accountNo, so i only to enter both endpoints if the accountNo is aplhanumeric.

This was my solution:

The first endpoint is working fine and it validates everything that i wanted However , every time i try to call endpoint 2 it returns not found.

Can you help me?

Upvotes: 2

Views: 351

Answers (1)

cassiomolin
cassiomolin

Reputation: 130857

The following should work:

@Path("/{accNo: [a-zA-Z0-9]*}/service")

Just remove $ that means end of line.

Upvotes: 2

Related Questions