Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

My tips o' the day

I found an easy way to update a MySQL database with new columns this morning. The traditional way is to create an ALTER_TABLE script and run it. However, I had added more than 30 columns, and creating this script sounded like a pain in the ass. Keep in mind that I use Hibernate to create my database from scratch - tables, and all. If you're familiar with appfuse, you might be able to use this stuff.

  • Dump the existing (production) database using "mysqldump -c database > database.sql". Edit this file, replacing CREATE TABLE with CREATE TABLE IF NOT EXISTS. The "-c" option includes column names in the insert statement.
  • Create an empty database (appfuse: ant db-init) and export (mysqldump database > create-tables.sql) it.
  • Drop all the tables in the production database (backup first!), mysql < create-tables.sql followed by mysql < database.sql.

Of course, other suggestions are welcome - I'd love to see a mysql diff tool that generates the ALTER script for me!

My other tip is how to start/stop Windows services from the command line - don't know why I haven't used this sooner.

net start "$serviceName"

Where $serviceName is something like "Apache Tomcat 4.1" - use "net start" to see all currently started services.

Posted in General at Sep 09 2003, 02:07:31 PM MDT 2 Comments
Comments:

I use the command line option for net services to start and stop tomcat in my ant script on my windows dev box. If I don't stop tomcat then I can't delete the project directory in webapps. Tomcat grabs the jar files and prevents deletion of the folder. Let me know if you want to see the ant task Steve

Posted by Steven Citron-Pousty on September 09, 2003 at 05:24 PM MDT #

Actually, I usually don't install Tomcat as a service. Rather I just use Cygwin and create aliases in by .bashrc and to start/stop tomcat. Here's the aliases from my PowerBook:

alias tstart '$CATALINA_HOME/bin/startup.sh'                                                                            
alias tstop '$CATALINA_HOME/bin/shutdown.sh'

If you'd like to post your script here though - feel free. If you wrap it in a <pre> tag, it'll probably look better.

Posted by Matt Raible on September 09, 2003 at 10:32 PM MDT #

Post a Comment:
  • HTML Syntax: Allowed