我新闻发布系统和实验室设备管理系统截图

[u]1.新闻发布系统截图---JSF+EJB3.0[/u]
[img]http://hiphotos.baidu.com/kennylin2008/pic/item/f123241b092c39e3ae513345.jpg[/img]
[img]http://photo.store.qq.com/http_imgload.cgi?/rurl2=25a6d507727c86f1b61c930cadd6760da7b9ae25c991d4ef07e3da7c5eb1de658184dff9602f73d02d940e56cf76de805f2193a81218e7ad4f9f024d07dd403d4d5ecc768d65719d1fd2bbb8729240698b9f761a[/img]
[img]http://photo.store.qq.com/http_imgload.cgi?/rurl2=8c90dda1511f6040faf6bb98cc893d04a352e46c0c39169c1e7cddad254fdfdb1539f64131c11ebe508fa89fd4b458bb23232b6a73bca4721d2bc8dec4573b4e797cc6954cc1f3547e53ab5fb8492bd5e774f858[/img]
2.实验室设备管理系统---JSF(Tomahawk)+Spring2.0+Hibernate3.2
[img]http://photo.store.qq.com/http_imgload.cgi?/rurl2=74627c4b70e23d99d1e92207645b37139535214572f5806f25ae249aca0c835660a96b3bd8ebb115e9f0de34ac314d936f97455b170fe22050bf84fbdac33a995ce9c4a847c2e1528603365053f0cb887942adc9[/img]

[img]http://photo.store.qq.com/http_imgload.cgi?/rurl2=ca8eed43dd45427418c84772b9e6143d4e179406e51b2549e055ed73b46caa7216c9fdf3669f3ea73efc792fc04e7e47e55e56b445067f274d998c912e4c5d484091ea483b638c8c68b6acade2c73aed30f0e859[/img]
[img]http://photo.store.qq.com/http_imgload.cgi?/rurl2=7274cf4ca216cc2beaca21d0d3da73dcffc589c2c32cc106a2591bd1dd464438e8b6d566d95da469df70bd6af7083963603b7cd56fbf520b8812ee52d64208d674918e7797903094f626a3ff1dd11520ce718130[/img]
[img]http://photo.store.qq.com/http_imgload.cgi?/rurl2=537836532c33b660a99d9882168fe153c7714923fd9f411f014a213bdf9b9e91c5ddf409959c2c590ed59772668b3b64e04f1775d1f4cbf8b5b7c4085c952a511d435491e78a9ebe0557a4b21494c41270c13d83[/img]
[img]http://photo.store.qq.com/http_imgload.cgi?/rurl2=2b15df886d6993a8010c7b55291c5eeb9b52e185722acaeaed4faad48600f70161787ee26a14ab70b8b77cb8f58f68b2f3c4a816b516855c4753c925528622986156b12739bbb3196a99f089098e9236b71a18fe[/img]
[img]http://photo.store.qq.com/http_imgload.cgi?/rurl2=300a7bff9159e93c348d218cb75f1d9bdf8144496a45622d20c80a96fbfa69356ac3a0be2f1696e8d3c6e3a30263d2419d716610f4c93664151652cfb73cf2aff2684603367b5c4a3d97236ee3034a0e893b0a56[/img]

我设计的部分超类:
/*
* EntityManagerDAOImpl.java
*
* Created on 2007年10月6日, 下午2:29
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/

package org.dgut.lab.model.dao.impl;

import java.sql.SQLException;
import java.util.List;
import org.dgut.lab.model.dao.EntityManagerDAO;
import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.orm.hibernate3.HibernateCallback;
import org.springframework.orm.hibernate3.HibernateTemplate;

/**
*
* @author LinChunyu
*/
public class EntityManagerDAOImpl implements EntityManagerDAO{
private HibernateTemplate hibernateTemplate;
/** Creates a new instance of EntityManagerDAOImpl */
public EntityManagerDAOImpl() {
}

public void delete(Object persistentInstance) {
hibernateTemplate.delete(persistentInstance);
}

public Object findById(Class cl,int id) {

return hibernateTemplate.get(cl, id);

}

public Object merge(Object detachedInstance) {
return hibernateTemplate.merge(detachedInstance);
}

public void persist(Object transientInstance) {
hibernateTemplate.persist(transientInstance);
}

public List execute(final String qry,final Object[] p) {

List list=(List)hibernateTemplate.execute(new HibernateCallback(){

public Object doInHibernate(Session session)
throws HibernateException, SQLException {
List list = null;
Query q = session.createQuery(qry);

if(p!=null){
for (int i = 0; i < p.length; i++) {
q.setParameter(i, p[i]);
}
}

return list = q.list();
}

});
return list;
}

public List execute(final String qry,final Object[] p,final int batchSize,final int firstItem) {

List list=(List)hibernateTemplate.execute(new HibernateCallback(){

public Object doInHibernate(Session session)
throws HibernateException, SQLException {
List list = null;
Query q = session.createQuery(qry);
if(p!=null){
for (int i = 0; i < p.length; i++) {
q.setParameter(i, p[i]);
}
}
q.setMaxResults(batchSize);
q.setFirstResult(firstItem);
return list = q.list();
}

});
return list;
}
public void setSessionFactory(SessionFactory sessionFactory) {
this.hibernateTemplate = new HibernateTemplate(sessionFactory);
}

}


package org.dgut.lab.view.controller;


import java.util.Locale;
import java.util.ResourceBundle;
import java.util.logging.Logger;

import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;

import org.dgut.lab.model.servicelocator.ServiceLocator;

public class BaseController {

protected ServiceLocator serviceLocator;

protected final Logger log = Logger.getLogger(this.getClass().getName());

private int command=0;

protected int pageNo=1;

protected long itemCount;

protected int totalPage;

protected int batchSize=4;

public BaseController() {

}

public void init() {

}

public void setServiceLocator(ServiceLocator newServiceLocator) {
this.serviceLocator = newServiceLocator;
init();
}

public static void addErrorMessage(String msg1) {
String msg=getMessageString(msg1);
FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR,
msg, msg);
FacesContext fc = FacesContext.getCurrentInstance();
fc.addMessage(null, facesMsg);
}

public static void addSuccessMessage(String msg1) {
String msg=getMessageString(msg1);
FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO,
msg, msg);
FacesContext fc = FacesContext.getCurrentInstance();
fc.addMessage("successInfo", facesMsg);
}
public static String getMessageString(String name) {
String str = "";
FacesContext facesContext = FacesContext.getCurrentInstance();
String bundleName = facesContext.getApplication().getMessageBundle();
if (bundleName != null) {
Locale locale = facesContext.getViewRoot().getLocale();
/*ResourceBundle bundle = ResourceBundle.getBundle(bundleName,
locale, getCurrentClassLoader(params));*/

ResourceBundle bundle = ResourceBundle.getBundle(bundleName,
locale);

/*ResourceBundle bundle = ResourceBundle.getBundle(bundleName,
locale, getCurrentClassLoader(params));*/
str = bundle.getString(name);
}
return str;
}

private static ClassLoader getCurrentClassLoader(Object params) {
return params.getClass().getClassLoader();
}

public long getItemCount() {
return this.itemCount;
}

public int getPageNo() {
return pageNo;
}

public int getTotalPage() {
long totalPage1 = getItemCount() % 20 == 0 ? getItemCount() /batchSize
: getItemCount() / batchSize + 1;
totalPage=Integer.parseInt(String.valueOf(totalPage1));
return this.totalPage;
}

public void setPageNo(int pageNo) {
this.pageNo = pageNo;
}

public void setItemCount(long itemCount) {
this.itemCount = itemCount;
}

public int getCommand() {
return command;
}

public void setCommand(int command) {
this.command = command;
}
}

Spring配置文件
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">

<!-- ****************** DataSource ********************* -->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
<property name="driverClass">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="jdbcUrl">
<value>jdbc:mysql://localhost:3306/devicemanage</value>
</property>
<property name="user">
<value>root</value>
</property>
<property name="password">
<value>123456</value>
</property>
<property name="initialPoolSize"><value>10</value></property>
<property name="minPoolSize"><value>5</value></property>
<property name="maxPoolSize"><value>30</value></property>
<property name="acquireIncrement"><value>5</value></property>
<property name="maxIdleTime"><value>10</value></property>
<property name="maxStatements"><value>0</value></property>
</bean>

<!-- ****************** SessionFactory ********************* -->
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</prop>
<prop key="hibernate.show_sql">
true
</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>org/dgut/lab/model/entity/Voucher.hbm.xml</value>
<value>org/dgut/lab/model/entity/Device.hbm.xml</value>
<value>org/dgut/lab/model/entity/User.hbm.xml</value>
<value>org/dgut/lab/model/entity/VoucherDevice.hbm.xml</value>
<value>org/dgut/lab/model/entity/ManageLog.hbm.xml</value>
<value>org/dgut/lab/model/entity/Country.hbm.xml</value>
<value>org/dgut/lab/model/entity/PowerList.hbm.xml</value>
</list>
</property>
</bean>

<!-- ****************** Transaction ********************* -->
<bean id="txManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>

<!-- -->
<tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<!-- all methods starting with 'get' are read-only -->
<tx:method name="get*" read-only="true" />
<!-- other methods use the default transaction settings (see below) -->
<tx:method name="*" />
</tx:attributes>
</tx:advice>

<aop:config>
<aop:pointcut id="fooServiceOperation"
expression="execution(* org.dgut.lab.model.service.*Service.*(..))" />
<aop:advisor advice-ref="txAdvice"
pointcut-ref="fooServiceOperation" />

</aop:config>

<!-- ****************** Service Locator ********************* -->
<bean id="serviceLocator"
class="org.dgut.lab.model.servicelocator.ServiceLocatorImpl">

<property name="userService">
<ref bean="userService" />
</property>

<property name="loanService">
<ref bean="loanService" />
</property>

<property name="deviceService">
<ref bean="deviceService" />
</property>

</bean>

<!-- ****************** DAO ********************* -->


<bean id="entityManagerDAO"
class="org.dgut.lab.model.dao.impl.EntityManagerDAOImpl">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>

<!-- ****************** Service ********************* -->


<bean id="deviceService"
class="org.dgut.lab.model.service.impl.DeviceServiceImpl">
<property name="entityManagerDAO">
<ref bean="entityManagerDAO" />
</property>
</bean>

<bean id="loanService"
class="org.dgut.lab.model.service.impl.LoanServiceImpl">
<property name="entityManagerDAO">
<ref bean="entityManagerDAO" />
</property>
</bean>
<bean id="userService"
class="org.dgut.lab.model.service.impl.UserServiceImpl">
<property name="entityManagerDAO">
<ref bean="entityManagerDAO" />
</property>
</bean>
</beans>

3.数据库查询分析处理器---RMI+JDBC+Swing
[img]http://photo.store.qq.com/http_imgload.cgi?/rurl2=d1c2f68b4aa4625f61a04530cfc023bc3764e0497660311e4a14426b96b39585d5187d9c95ef852e680d0a0f857075076c17fb5e29af11689a033e9b42310690dfa7e0c3cd78d6dc29220f6f0f53bcb9a8d94e3b[/img]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
基于java的实验室网上预约系统设计与实现 技术:后端:java,前端:html+js+css 框架:springBoot SSM 运行工具:idea 数据库:mysql 源码:详见文章最后 1、    登录页面: 2、首页 3、用户管理  4、添加用户  5、角色管理  6、添加角色  7、编辑角色 8、预约管理  9、新增预约  10、数据统计 数据库脚本如下: CREATE TABLE `sys_user_t` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `role_id` VARCHAR(500) NULL DEFAULT NULL COMMENT '角色ID', `user_id` VARCHAR(50) NOT NULL COMMENT '用户ID', `user_name` VARCHAR(100) NOT NULL COMMENT '用户名', `status` VARCHAR(50) NOT NULL COMMENT '是否有效0:false\\\\\\\\1:true', `create_date` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, `create_by` VARCHAR(100) NULL DEFAULT NULL, `last_update_date` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, `last_update_by` VARCHAR(100) NULL DEFAULT NULL, `password` VARCHAR(128) NOT NULL, `tenantcode` VARCHAR(50) NOT NULL, `diskId` VARCHAR(500) NULL DEFAULT NULL, `remarks` VARCHAR(500) NULL DEFAULT NULL, PRIMARY KEY (`id`) ) COMMENT='系统用户表' COLLATE='utf8_general_ci' ENGINE=InnoDB AUTO_INCREMENT=52 ; CREATE TABLE `sys_role_t` ( `role_id` INT(11) NOT NULL COMMENT '角色ID', `role_name` VARCHAR(200) NOT NULL COMMENT '权限名称', `status` INT(11) NOT NULL COMMENT '是否有效0:true\\\\1:false', `create_date` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, `create_by` VARCHAR(100) NULL DEFAULT NULL, `last_update_date` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, `last_update_by` VARCHAR(100) NULL DEFAULT NULL ) COMMENT='系统角色表' COLLATE='utf8_general_ci' ENGINE=InnoDB ; CREATE TABLE `sys_menu_t` ( `id` INT(11) NOT NULL AUTO_INCREMENT COMMENT '序列', `parent_id` VARCHAR(50) NOT NULL COMMENT '父节点ID', `menu_id` VARCHAR(50) NOT NULL COMMENT '菜单ID', `menu_name` VARCHAR(200) NOT NULL COMMENT '菜单名称', `menu_url` VARCHAR(200) NULL DEFAULT NULL COMMENT '菜单URL', `status` INT(11) NOT NULL COMMENT '有效(0有效,1失效)', `create_date` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, `create_by` VARCHAR(200) NULL DEFAULT NULL, `last_update_date` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, `last_update_by` VARCHAR(200) NULL DEFAULT NULL, PRIMARY KEY (`id`) ) COMMENT='菜单表' COLLATE='utf8_general_ci' ENGINE=InnoDB AUTO_INCREMENT=33 ; CREATE TABLE `client_manager_t` ( `id` INT(11) NOT NULL AUTO_INCREMENT COMMENT '序列', `clientId` VARCHAR(50) NULL DEFAULT NULL COMMENT '客户编号', `clientName` VARCHAR(50) NULL DEFAULT NULL COMMENT '客户姓名', `address` VARCHAR(200) NULL DEFAULT NULL COMMENT '客户住址', `source` VARCHAR(200) NULL DEFAULT NULL COMMENT '客户所属公司', `sourceDate` VARCHAR(200) NULL DEFAULT NULL COMMENT '客户发展时间', `status` VARCHAR(200) NULL DEFAULT NULL COMMENT '客户级别', `clientNum` VARCHAR(200) NULL DEFAULT NULL COMMENT '拜访客户次数', `isTrue` VARCHAR(200) NULL DEFAULT NULL COMMENT '客户是否有效', PRIMARY KEY (`id`) ) COMMENT='客户人员信息表' COLLATE='utf8_general_ci' ENGINE=InnoDB AUTO_INCREMENT=47 ;

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值