Java - Apache CXF: return response code(HTTP status code)
1 2 3 4 5 6 7 import javax.ws.rs.core.Response; Entity entity = service.getById(uuid); if(entity == null) { return Response.status(Response.S...
1 2 3 4 5 6 7 import javax.ws.rs.core.Response; Entity entity = service.getById(uuid); if(entity == null) { return Response.status(Response.S...
Useful commands 1 2 3 4 5 6 7 8 9 10 1. Prepare mvn release:prepare 2. Perform release mvn release:perform 3. Update develop version number mvn release...
1 2 3 4 5 6 7 8 9 10 log4j.rootLogger=INFO, loggerId log4j.appender.loggerId=org.apache.log4j.rolling.RollingFileAppender log4j.appender.loggerId.rollingPoli...
It is common to get a Servlet context on implementing WEB API. Apache CXF has a little different approach to get this instance. The following code show how t...
With the following command you can create an application directory quickly 1 2 mvn archetype:generate -DgroupId=com.demo.app -DartifactId=appDemo -Darchetyp...