This is springboot example for secure jaxrs service on springboot using undertow as underlying container.
keytool -genkey -alias mydomain -keyalg RSA -keystore keystore.jks -keysize 2048
keytool -export -alias mydomain -file mydomain.crt -keystore keystore.jks
keytool -import -trustcacerts -alias mydomain -file mydomain.crt -keystore clientkeystore.jks
mvn spring-boot:run