package quanlynhansu;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableAutoConfiguration
@ComponentScan
public class App extends SpringBootServletInitializer {
	@Override
	protected SpringApplicationBuilder configure(
			SpringApplicationBuilder application) {
		return application.sources(App.class);
	}

	public static void main(String[] args) throws Exception {
		SpringApplication.run(App.class, args);
	}
}

@@ -16,16 +16,76 @@
 hansu;%0A%0A
+import java.sql.Connection;%0Aimport java.sql.DriverManager;%0A%0A
 import o
@@ -572,16 +572,404 @@
 lizer %7B%0A
+%09public static Connection getConnection() %7B%0A%09%09Connection con = null;%0A%09%09try %7B%0A%09%09%09Class.forName(%22com.mysql.jdbc.Driver%22).newInstance();%0A%09%09%09con = DriverManager.getConnection(%0A%09%09%09%09%09%22jdbc:mysql://127.0.0.1/quanlynhansu?useUnicode=yes&characterEncoding=UTF-8%22, %22root%22, %2202251995%22);%0A%09%09%7D catch (Exception e) %7B%0A%09%09%09System.out.println(e.getMessage());%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09return con;%0A%09%7D%0A%09%0A
 %09@Overri

Connect database in App.java