Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Spring Roo 1.1 Cookbook

You're reading from   Spring Roo 1.1 Cookbook Over 60 recipes to help you speed up the development of your Java web applications using the Spring Roo development tool

Arrow left icon
Product type Paperback
Published in Sep 2011
Publisher Packt
ISBN-13 9781849514583
Length 460 pages
Edition 1st Edition
Arrow right icon
Toc

Table of Contents (14) Chapters Close

Spring Roo 1.1 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with Spring Roo 2. Persisting Objects Using JPA FREE CHAPTER 3. Advanced JPA Support in Spring Roo 4. Web Application Development with Spring Web MVC 5. Web Application Development with GWT, Flex, and Spring Web Flow 6. Emailing, Messaging, Spring Security, Solr, and GAE 7. Developing Add-ons and Removing Roo from Projects Index

Viewing properties defined in a properties file


If your project contain properties files, you may want to view their content. For instance, when we created the flight-app Roo project earlier, a log4j.properties file containing logging configuration was also created. In this recipe, we will look at the properties list command to view the contents of the log4j.properties file.

Getting ready

Start the Roo shell from C:\roo-cookbook\ch01-recipe directory, which contains the flight-app Roo project.

How to do it...

To view the contents of a properties file, the properties list command requires a path to the properties file and its name. The following properties list command displays the contents of the log4j.properties file:

roo> properties list --name log4j.properties --path SRC_MAIN_RESOURCES

log4j.appender.R = org.apache.log4j.RollingFileAppender
log4j.appender.R.File = application.log
...
log4j.logger.sample.roo.flightapp = DEBUG
log4j.rootLogger = DEBUG, stdout

How it works...

The Properties file add-on is responsible for processing the properties list command. The following table describes the arguments it accepts:

Argument

Purpose

path

It is a mandatory argument that identifies a path to the properties file. It only accepts pre-defined values like ROOT, SPRING_CONFIG_ROOT, SCR_MAIN_WEBAPP, and so on.

name

It is a mandatory argument that specifies the name of the properties file whose content you want to view.

See also

  • The next recipe, Managing properties defined in a properties file, shows how you can add, remove, and modify properties defined in properties files in your Roo project.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image