建筑工程有限責(zé)任公司搜索引擎優(yōu)化教程
文章目錄
- **軟件開(kāi)發(fā)環(huán)境及開(kāi)發(fā)工具:**
- **功能介紹:**
- **實(shí)現(xiàn):**
- **代碼片段:**
編程技術(shù)交流、源碼分享、模板分享、網(wǎng)課教程
🐧裙:776871563
軟件開(kāi)發(fā)環(huán)境及開(kāi)發(fā)工具:
前端技術(shù):js+css+Jsp+jQuery(js框架)+jQueryEasyUi(基于jQuery的前端框架)+BootStrap(前端框架)
后端技術(shù):springboot、SpringMvc(接入層框架)+Spring(中間層框架)+Hibernate(持久層框架)+JPA
數(shù)據(jù)庫(kù):Mysql
項(xiàng)目管理工具:Maven
功能介紹:
系統(tǒng)管理:用戶(hù)登錄、用戶(hù)退出。
用戶(hù)管理:主要實(shí)現(xiàn)對(duì)用戶(hù)的增刪改查以及審核操作。
角色管理:主要實(shí)現(xiàn)對(duì)用戶(hù)的增刪改查以及角色綁定用戶(hù)、角色解綁用戶(hù)、角色綁定操作、角色解綁操作
模塊管理:主要實(shí)現(xiàn)對(duì)模塊的增刪改查
實(shí)現(xiàn)用戶(hù)權(quán)限控制,不同用戶(hù)登錄至系統(tǒng)看到的功能界面不一樣
實(shí)現(xiàn):
代碼片段:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;public class DbUtil {private String dbUrl="jdbc:mysql://127.0.0.1:3306/database?serverTimezone=UTC&useSSL=false"; // 數(shù)據(jù)庫(kù)連接地址private String dbUserName="root"; // 用戶(hù)名private String dbPassword="123456"; // 密碼private String jdbcName="com.mysql.cj.jdbc.Driver"; // 驅(qū)動(dòng)名稱(chēng)/*** 獲取數(shù)據(jù)庫(kù)連接* @return* @throws Exception*/public Connection getCon(){try {Class.forName(jdbcName);} catch (ClassNotFoundException e) {// TODO Auto-generated catch blocke.printStackTrace();}Connection con = null;try {con = DriverManager.getConnection(dbUrl, dbUserName, dbPassword);} catch (SQLException e) {// TODO Auto-generated catch blocke.printStackTrace();}return con;}/*** 關(guān)閉數(shù)據(jù)庫(kù)連接* @param con* @throws Exception*/public void closeCon(Connection con)throws Exception{if(con!=null){con.close();}}public static void main(String[] args) {DbUtil dbUtil=new DbUtil();try {dbUtil.getCon();System.out.println("數(shù)據(jù)庫(kù)連接成功!");} catch (Exception e) {// TODO Auto-generated catch blocke.printStackTrace();System.out.println("數(shù)據(jù)庫(kù)連接失敗");}}
}