I am creating Web APIs, in a RESTful manner. Grails of course has good support for creating REST web services. Enunciate claims to help in the API part, where things like documentation, client libraries, etc are important.
The purpose of this post is to invite experiences on using Enunciate with Grails, or ideas on how that can be done.
There are two main issues using them together:
Enunciate works with JAX-RS, not the native implementation of REST by Grails. Thankfully there's a JAX-RS plugin available, but am not sure if Enunciate will be able to work with it.
Grails domain classes are in Groovy while Enunciate works with Java
source code (example).
Enunciate works with both Java source code and Java compiled bytecode to do its work. But if you don't have Java source code, Enunciate won't be able to pull stuff out of your JavaDocs to enhance its generated documentation. Given that, there should (theoretically) be a way to apply Enunciate to compiled Groovy bytecode, but your docs won't be as rich because Enunciate won't be able to see your JavaDoc documentation. I say theoretically because I don't have any personal experience with it nor do I know how painful it is to pull off.
There is an open issue at ENUNCIATE-356 to investigate this complexity. Note that ENUNCIATE-356 depends on ENUNCIATE-584, which might get some more traction soon, being driven by ENUNCIATE-585 as we move from using APT (introduced in Java 5, deprecated in Java 7) to the Javac tool (introduced in Java 6). It would be interesting to know whether the Javac tool supports languages other than Java, in which case we'd get Groovy support for free.
Related
I want to use Kotlin with the Spring Tools suite plugin for VSCode but it only supports Java (For things like intellisense).
I know I should just use intelliJ and I will for now but I program in a lot of different languages daily and I would like to do all of this from the same tool.
The Spring Tools 4 extension for VSCode does not support Kotlin yet (for the Spring specific tooling). Feel free to comment on https://github.com/spring-projects/sts4/issues/163
I'm rather impressed by what I see of JRockit's built-in weaving/AOP support. Is there any similarly-easy-to-use support for AOP weaving on OpenJDK?
The code I am trying to instrument is often loaded via Maven, so hooking in to classloaders to e.g. install a weaving classloader may be difficult. A JMTI-based solution may or may not be practical.
Is there a comprehensive discussion of the approaches of using Google Guice in the context of Eclipse plugins? There is the Peaberry project that targets OSGi containers in general, but this seems not to be used much in production plugin projects, which makes me a bit skeptic to use it (someone correct me if I'm wrong).
The complete Xtext and Xtend wiring is done with Guice. This includes the non-Eclipse relevant parts but also the Eclipse plugins and UI components.
is there any possibilities how to generate DAO classes in IntelliJ IDEA? I found many articles about generating entities but none of how to generate DAO.
I am using 11.1.2 version.
It should be noted that Intellij does now support this. Follow the guide here:
New Intellij Functionality
IntelliJ IDEA doesn't support it, you can consider using Hibernate Tools instead via Ant:
Ant task: The Hibernate3 tools include a unified Ant task that allows you to run schema generation, mapping generation, or Java code generation as part of your build.
The tools for Hibernate provides various tools to use with Hibernate.
The primary tools can be used for generating source artifacts such as
mapping files, java entities, DAO and other scaffolding code. The
source of this generation can be JDBC database, classes or even just
existing mappings.
It uses Hibernate core metamodel to generate from and to the source
artifacts. Allowing it to support both top-down, bottom-up and
middle-out development.
Hibernate Tools is used in JBoss Tools Hibernate plugins to provide
parts of the Eclipse plugins for Hibernate.
I am looking for mocking framework to use in my osgi/eclipse test fragments. I have looked at:
http://www.jmock.org/download.html
but since its not osgi I need to convert it manually. I have tried to google for some mocking frameworks that works with osgi out of the box but have not been able to find any, does osgi developers not use mocking?
One solution will be to create mock objects of OSGi objects (like BundleContext and ServiceReference). You can use any mocking framework for this and of course you don't have to run the test in an OSGi container. This will be OK for simple scenarios.
If you want to test inside a container, you have the following options:
Pax-Exam
Spring DM Testing facilities
Actually Mockito works quite good with OSGI applications, since it has OSGI manifest. You can simply add it to your target platform from the latest orbit repository. I managed to make Powermock also working for Eclipse Plugins and it is available as well as update site at https://code.google.com/p/powermock-osgi/