Commit 02264d69 by Patryk Czarnik

Hello world w Jersey

parent 9dfc63be
package com.demo;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
@Path("/hello")
public class Hello {
@GET
@Produces("text/plain")
public String hello() {
return "Hello Jersey";
}
}
package com.demo;
import org.glassfish.jersey.server.ResourceConfig;
import org.springframework.context.annotation.Configuration;
@Configuration
public class JerseyConfig extends ResourceConfig {
public JerseyConfig() {
register(Hello.class);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment