[JavaEE] Bootstrapping a JavaEE Application

To bootsrap the application use the following Maven archetype:
mvn -DarchetypeGroupId=org.codehaus.mojo.archetypes -DarchetypeArtifactId=webapp-javaee7 -DarchetypeVersion=1.1 -DgroupId=com.pluralsight.javaee-getting-started -DartifactId=bookstore-back -Dversion=1.0 -Darchetype.interactive=false --batch-mode -Dpackage=com.pluralsight.bookstore archetype:generate

It genearte a 'bookstore-back' project:

Compile the code:

mvn package

It generates a 'target' directory.

Start the Wildfly:

cd /usr/local/Cellar/wildfly-as/13.0.0.Final/libexec/bin

Run:

./standalone.sh

Open broswer: localhost:8080 --> Administration Console --> Deployments --> Create a new deployment --> Upload '.war' file from 'target' folder.

After successful deployment, visit the broswer: http://localhost:8080/bookstore-back-1.0/, it displays "Hello World!"

 

猜你喜欢

转载自www.cnblogs.com/Answer1215/p/9357833.html