Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Spring Roo run alongside Spring Boot

I am currently developing a Spring Roo application. The application already has quite a large codebase.

Moreover, I am very interested in Spring Boot's many features but I am not sure whether my Roo app can also run Spring Boot and if that is indeed the case what are the architectural issues to take into account in order to plug-in Spring Boot into my Roo app.

So, is Roo compatible with Boot?

What do I need to take into account before I undertake to add Boot to my Roo app?

like image 483
balteo Avatar asked Jun 12 '14 19:06

balteo


People also ask

What is spring boot best for?

Spring Boot is an open-source tool that makes it easier for developers to create standalone digital products and production-ready spring applications including Java applications and web services. It uses a micro framework, which makes it most useful for creating microservices for websites and mobile apps.

Where can I run my spring?

You can run a Spring Boot application from your IDE as a simple Java application, however, first you will need to import your project. Import steps will vary depending on your IDE and build system. Most IDEs can import Maven projects directly, for example Eclipse users can select Import…

How do I download spring Roo?

To obtain Roo, you can either download its standalone command-line shell version or use the version built into SpringSource Tool Suite. You can also download both and use them together if you prefer: Spring Roo.


2 Answers

Spring Roo is useful to generate and maintain source code and to avoid to write tons of boilerplate code. It's really useful for CURD web application and I think it does not gain anything by the use of Boot.

Spring Boot is a way to help you to boost the environment configuration phase and to let you start to use your app as soon as possible. As the Spring guys say:

Spring Boot favors convention over configuration and is designed to get you up and running as quickly as possible.

Spring Boot features:

  • Create stand-alone Spring applications
  • Embed Tomcat or Jetty directly (no need to deploy WAR files)
  • Provide opinionated 'starter' POMs to simplify your Maven configuration
  • Automatically configure Spring whenever possible
  • Provide production-ready features such as metrics, health checks and externalized configuration
  • Absolutely no code generation and no requirement for XML configuration

If you already have an established app, I can't see real advantages to use Boot (and in any case I didn't saw a "Boot powered" app in any real production environment yet), but if you want to use it anyway you can do it without problems, just take care of these:

  • Roo enrich your code through AspectJ, writing file aside by your source files, so these parts are transparent to tools like Boot
  • Roo generates configuration files also, and some of them are Spring configuration files. These configuration are the same domain of work of Boot, but Boot take the precedence and can ignore them (convention over configuration) so you need to pay attention about that, and redo with Boot, using convention, the same thing Roo had already done for you but is actually ignored at runtime

For the rest, Boot integrates with Roo as with other already developed Spring app.

like image 104
Giuseppe Bertone Avatar answered Sep 30 '22 04:09

Giuseppe Bertone


I am resurrecting an old question, as the following answer will now be appropriate.

As of Spring Roo 2.0, it will generate code based on Spring Boot code. See http://spring.io/blog/2015/03/30/looking-ahead-to-spring-roo-2-0

Notably, it says:

Create applications based on the extensive set of Spring technologies: Spring Boot, Spring Data, Spring MVC, Spring Security, etc.

Currently, Spring Roo 2.0 M2 has been released.

like image 25
dleerob Avatar answered Sep 30 '22 04:09

dleerob