⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test.java

📁 JSP的网上商城的代码。只是小部分。希望大家能够多看看。一起学习。
💻 JAVA
字号:
package com.eshop.database;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.eshop.database.dbconn;
import com.eshop.dto.Goods;

public class test {

	/**
	 * @param args
	 * @throws SQLException 
	 */
	public static void main(String[] args) throws SQLException {
		dbconn conn = new dbconn();
		ResultSet rs = null;
		rs = conn.executeQuery("select * from goods");
		while(rs.next()){
			Goods goods = new Goods();
			goods.setId(rs.getInt("id"));
			goods.setBrand(rs.getString("brand"));
			goods.setIntime(rs.getString("intime"));
			goods.setIntroduc(rs.getString("introduce"));
			goods.setNowprice(rs.getDouble("nowprice"));
			goods.setPicture(rs.getString("picture"));
			goods.setPrice(rs.getDouble("price"));
			goods.setType("type");
			goods.setSaletol(rs.getInt("saletol"));
			System.out.print(goods.getId());
		}

		conn.close();
		

	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -