Sunday, September 29, 2019

Spring boot

Change directory to the source code
cd /where/the/pom/file/is
mvn install
Run application server
mvn spring-boot:run
Application will be started with port 8080

Friday, September 27, 2019

What is a Spring Bean

A "Spring Bean" is simply a Java object.
When Java objects are created by the Spring Container, then Spring refers to them as "Spring Beans".
Spring Beans are created from normal Java classes .... just like Java objects.
---
Here's a blurb from the Spring Reference Manual
---
In the early days, there was a term called "Java Beans". Spring Beans have a similar concept but Spring Beans do not follow all of the rigorous requirements of Java Beans.
---
In summary, whenever you see "Spring Bean", just think Java object. :-)

Thursday, September 26, 2019

Cài đặt môi trường code trên ubuntu

apt-get update && apt-get upgrade
jdk
sudo apt install openjdk-8-jdk
Tomcat
apt-get install tomcat8
cd /usr/share/tomcat8
sudo ln -s /var/lib/tomcat8/conf conf
sudo ln -s /var/log/tomcat8 log
sudo ln -s /etc/tomcat8/policy.d/03catalina.policy conf/catalina.policy
sudo chmod -R a+rwx /usr/share/tomcat8/conf
systemctl stop tomcat8 // để chạy tomcat từ eclipse trên cổng 8080
Tải eclipse installer từ eclipse.com


Spring