|
From: Sean D. <sea...@gm...> - 2014-04-08 14:53:47
|
Hello, Going through the docs and it's not clear to me what's the current correct approach to creating a standalone RestEasy app. I'm adding this in my pom.xml... <dependency> <groupId>org.jboss.resteasy</groupId> <artifactId>resteasy-servlet-initializer</artifactId> <version>3.0.7.Final</version> </dependency> But then what? Do I use the class scanning, or the application class, or... ? I'm thinking the former but just want to double-check. Also, just fyi, the Libary class is missing a closing paren at the end of the method signature for removeBook. Thanks. |
|
From: Bill B. <bb...@re...> - 2014-04-08 15:02:51
|
If you are using resteasy-servlet-initializer (and I suggest you do) you
should have an Application class. Just do the following
@ApplicationPath("/the/root/you/want")
public class MyApplication extends Application {}
On 4/8/2014 10:53 AM, Sean Dawson wrote:
> Hello,
> Going through the docs and it's not clear to me what's the current
> correct approach to creating a standalone RestEasy app. I'm adding this
> in my pom.xml...
> <dependency>
> <groupId>org.jboss.resteasy</groupId>
> <artifactId>resteasy-servlet-initializer</artifactId>
> <version>3.0.7.Final</version>
> </dependency>
> But then what? Do I use the class scanning, or the application class,
> or... ? I'm thinking the former but just want to double-check.
> Also, just fyi, the Libary class is missing a closing paren at the end
> of the method signature for removeBook.
> Thanks.
>
>
> ------------------------------------------------------------------------------
> Put Bad Developers to Shame
> Dominate Development with Jenkins Continuous Integration
> Continuously Automate Build, Test & Deployment
> Start a new project now. Try Jenkins in the cloud.
> http://p.sf.net/sfu/13600_Cloudbees
>
>
>
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|
|
From: Bill B. <bb...@re...> - 2014-04-08 15:04:37
|
All the examples here use the servlet initializer: https://github.com/resteasy/Resteasy/tree/master/jaxrs/examples/oreilly-jaxrs-2.0-workbook If you have an Application class that returns empty lists from getClasses() and getSingletons(), then scanning will be used. On 4/8/2014 10:53 AM, Sean Dawson wrote: > Hello, > Going through the docs and it's not clear to me what's the current > correct approach to creating a standalone RestEasy app. I'm adding this > in my pom.xml... > <dependency> > <groupId>org.jboss.resteasy</groupId> > <artifactId>resteasy-servlet-initializer</artifactId> > <version>3.0.7.Final</version> > </dependency> > But then what? Do I use the class scanning, or the application class, > or... ? I'm thinking the former but just want to double-check. > Also, just fyi, the Libary class is missing a closing paren at the end > of the method signature for removeBook. > Thanks. > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > > > > _______________________________________________ > Resteasy-developers mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-developers > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Sean D. <sea...@gm...> - 2014-04-08 15:29:45
|
Ah ok, thanks. I looked at the wrong version of the book examples earlier. On Tue, Apr 8, 2014 at 11:04 PM, Bill Burke <bb...@re...> wrote: > All the examples here use the servlet initializer: > > > https://github.com/resteasy/Resteasy/tree/master/jaxrs/examples/oreilly-jaxrs-2.0-workbook > > If you have an Application class that returns empty lists from > getClasses() and getSingletons(), then scanning will be used. > > On 4/8/2014 10:53 AM, Sean Dawson wrote: > > Hello, > > Going through the docs and it's not clear to me what's the current > > correct approach to creating a standalone RestEasy app. I'm adding this > > in my pom.xml... > > <dependency> > > <groupId>org.jboss.resteasy</groupId> > > <artifactId>resteasy-servlet-initializer</artifactId> > > <version>3.0.7.Final</version> > > </dependency> > > But then what? Do I use the class scanning, or the application class, > > or... ? I'm thinking the former but just want to double-check. > > Also, just fyi, the Libary class is missing a closing paren at the end > > of the method signature for removeBook. > > Thanks. > > > > > > > ------------------------------------------------------------------------------ > > Put Bad Developers to Shame > > Dominate Development with Jenkins Continuous Integration > > Continuously Automate Build, Test & Deployment > > Start a new project now. Try Jenkins in the cloud. > > http://p.sf.net/sfu/13600_Cloudbees > > > > > > > > _______________________________________________ > > Resteasy-developers mailing list > > Res...@li... > > https://lists.sourceforge.net/lists/listinfo/resteasy-developers > > > > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees > _______________________________________________ > Resteasy-developers mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-developers > |