JavaEE
Xiuye_XY
Nothing
展开
-
Java Excel下拉选过长时创建引用列表
Sheet sheet = workbook.getSheet(hiddenSheet); if (Objects.isNull(sheet)) { sheet = workbook.createSheet(hiddenSheet); } int sheetIdx = workbook.getSheetIndex(sheet); SheetVisibility visibili..原创 2021-08-22 19:25:20 · 183 阅读 · 0 评论 -
Java Easyexcel 设置单元格下拉选
import com.alibaba.excel.metadata.CellData;import com.alibaba.excel.metadata.Head;import com.alibaba.excel.write.handler.CellWriteHandler;import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;import com.alibaba.excel.write.metadata.holder....原创 2021-08-21 18:12:38 · 1526 阅读 · 0 评论 -
Java Spring boot nacos 服务发现配置
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"&g.原创 2021-06-17 22:16:58 · 82 阅读 · 0 评论 -
ZooKeeper 连接和创建节点
package com.xiuye.test;import com.xiuye.sharp.X;import org.apache.zookeeper.CreateMode;import org.apache.zookeeper.Watcher;import org.apache.zookeeper.ZooDefs;import org.apache.zookeeper.ZooKeeper;import org.junit.Test;import java.io.IOException;.原创 2020-08-16 23:54:37 · 754 阅读 · 0 评论 -
EJB正确客户端调用(jboss6、jboss7)
服务器端:17:47:50,930 信息 [org.jboss.modules] JBoss Modules version 1.1.1.GA17:47:51,054 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA17:47:51,088 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.原创 2016-01-15 17:50:54 · 959 阅读 · 0 评论 -
EJB invocations from a remote client using JNDI
package org.jboss.as.quickstarts.ejb.remote.stateless; /** * @author Jaikiran Pai */public interface RemoteCalculator { int add(int a, int b); int subtract(int a, int b);}package or转载 2016-01-15 18:16:11 · 377 阅读 · 0 评论 -
EJB拦截器
package remote;import javax.ejb.Remote;@Remotepublic interface Hello { String hello(String name); void crazyit(); void exclude(); }package intercepter;import javax.interceptor.AroundI原创 2016-01-17 14:55:02 · 339 阅读 · 0 评论 -
ejb injection
package local;import javax.ejb.Local;@Localpublic interface Service { public String hello(String name); }package stateless;import javax.ejb.Stateless;import local.Service;@Stateless(n原创 2016-01-17 15:00:58 · 348 阅读 · 0 评论 -
Maven带jetty服务器插件
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.原创 2016-01-20 15:22:56 · 598 阅读 · 0 评论 -
primefaces 伸缩可合可并 panel,datatable的footer下分页
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"> Product原创 2016-01-22 11:19:39 · 1311 阅读 · 0 评论 -
carousel(primefaces)
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:p="http://primefaces.o转载 2016-01-04 19:47:01 · 620 阅读 · 0 评论 -
dataList(primefaces)
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:c="http://xmlns.jcp.or原创 2016-01-04 19:45:17 · 678 阅读 · 0 评论 -
dataScroller(primefaces)
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:c="http://xmlns.jcp.or原创 2016-01-04 19:43:47 · 628 阅读 · 0 评论 -
dataGrid(primefaces)
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:c="http://xmlns.jcp.or原创 2016-01-04 18:23:41 · 448 阅读 · 0 评论 -
struts2的一个杂乱工程
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN" "http://struts.apache.org/dtds/struts-2.1.7.dtd"> <!-- package:包,用原创 2016-01-08 19:03:21 · 383 阅读 · 0 评论 -
jsf ActionListener 查找正确的UIComponent
package com.xiuye.jsf.listener;import javax.faces.component.UIComponent;import javax.faces.component.UIOutput;import javax.faces.component.UIViewRoot;import javax.faces.component.html.HtmlBody;i原创 2015-12-27 14:10:24 · 580 阅读 · 0 评论 -
spring and hibernate mixed
runing result:16:57:17,439 INFO ClassPathXmlApplicationContext:574 - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1de06d7e: startup date [Wed Jan 13 16:57:17 CST 2016原创 2016-01-13 16:59:51 · 573 阅读 · 0 评论 -
springandstruts2整合
applicationContext.xml:/WEB-INF/applicationContext.xml<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="h原创 2016-01-13 18:33:33 · 431 阅读 · 0 评论 -
hibernate.cfg.xml(2)
<!DOCTYPE hibernate-configuration PUBLIC"-//Hibernate/Hibernate Configuration DTD 3.0//EN""http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"><property name="connection.driver_class"转载 2016-03-07 15:51:15 · 394 阅读 · 0 评论 -
JFinal First Demo "Hello World"
jfinal1 index.html index.htm index.jsp default.html default.htm default.jsp jfinal com.jfinal.core.JFinalFilter configClass com.SelfConfig原创 2016-03-15 12:36:53 · 1351 阅读 · 0 评论 -
spring 与 jsf整合
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/we原创 2016-04-13 23:45:14 · 853 阅读 · 0 评论 -
当spring报close不能手动控制和rollback不能手动控制
解决:close不能手动控制try { this.sqlSessionTemplate.getConnection().setAutoCommit(false); 。。。。。。。 this.sqlSessionTemplate.commit(); return true; } catch (Exception e) { //this.sqlSessionTem原创 2016-05-11 15:52:18 · 1499 阅读 · 0 评论 -
框架的事务管理
不管是注解声明事务还是框架调用API进行事务管理,必须保证所需要的bean在框架的管理下,否则事务功能不能生效。例:spring的中普通java bean 如果是直接new 出来的对象,就没有spring管理下增加的功能,如事务管理,如果手工调用管理事务,可能会出错。因为数据库连接池多个connection,谁知道哪个是当前的connection,可以进行事务管理。框架管理下的bean才能原创 2016-05-12 09:56:21 · 297 阅读 · 0 评论 -
struts2配置并且可以注解
web.xml配置文件:<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/x原创 2016-05-02 18:26:41 · 1202 阅读 · 0 评论 -
Primefaces menu中的menuitem过多产生的问题
Primefaces menu中的menuitem过多或导致submenu产生子菜单藏在面板内部,需要滚动条才能看到:原创 2016-05-15 12:33:43 · 493 阅读 · 0 评论 -
JSF可以直接以方法作为属性值
disabled="#{registerView.checkAgreeProtocol()}":直接以方法作为属性值原创 2016-05-15 17:32:58 · 371 阅读 · 0 评论 -
JSF EL 对应jsp内置对象
JSF EL能搜索Java Web应用的三个范围:application、session、request中以匹配特定关键字的对象。因为JSF一定要锁定到JSP,所以它不支持 page范围。JSF EL支持的隐含变量有:cookie、header、headerValues、initParam、param、paramValues、 applicationScope、sessionScope、reque转载 2016-05-16 11:45:00 · 425 阅读 · 0 评论 -
Spring事务传播类型
Spring事务类型详解:PROPAGATION_REQUIRED--支持当前事务,如果当前没有事务,就新建一个事务。这是最常见的选择。PROPAGATION_SUPPORTS--支持当前事务,如果当前没有事务,就以非事务方式执行。PROPAGATION_MANDATORY--支持当前事务,如果当前没有事务,就抛出异常。PROPAGATION_REQUIRES_NEW--新建事务...转载 2016-04-21 09:29:30 · 319 阅读 · 0 评论 -
ActiveMQ First Demo
package com.xiuye.activemq;import javax.jms.Connection;import javax.jms.ConnectionFactory;import javax.jms.DeliveryMode;import javax.jms.Destination;import javax.jms.JMSException;import javax.j转载 2016-05-18 12:45:56 · 303 阅读 · 0 评论 -
primefaces设置calendar年份范围
<p:calendar id="birthday" pattern="yyyy-mm-dd" placeholder="请输入日期" required="true" mask="true" yearRange="c-100:c+10" showButtonPanel="true" navigator="true"> primefaces通过设置yearRange原创 2016-05-08 18:01:56 · 1153 阅读 · 0 评论 -
启动primefaces和解决mime的问题 在web.xml文件中配置
<!--what's FontAwesome FontAwesome Font Awesome is a highly customizable scalable vector iconset with 479 icons. In addition to the default ThemeRoller icons, Font Awesome icons are provided o原创 2016-06-08 21:48:43 · 852 阅读 · 0 评论 -
JSF1063:警告!将不可序列化属性值设置为 HttpSession(密钥:{0},值类:{1})。
JSF1063:警告!将不可序列化属性值设置为 HttpSession(密钥:{0},值类:{1})。结局办法就是将相关的类序列化就行了即,继承java.io.Serializable接口原创 2016-06-05 02:34:37 · 1364 阅读 · 0 评论 -
JSF使用注解的时候
JSF使用注解方式注入某个类的时候,应该生成get或者set方法,否则要报错。原创 2016-06-05 02:37:06 · 846 阅读 · 0 评论 -
JSF对应的实体类一定要使用set和get方法
package com.xiuye.orm;import java.util.Date;public class User { private String userid; private String username; private String password; private String sex; private Date birthday; private S原创 2016-06-05 18:40:56 · 1160 阅读 · 0 评论 -
javaweb 结合 springmvc 实现的 文件下载(Maybe myself do like this?)
@RequestMapping("/downloadBook.do") @ResponseBody public void downloadBook(String bookid, HttpServletResponse response, HttpServletRequest request) { Book book = this.bookService.getBookByBook原创 2016-06-11 13:22:38 · 877 阅读 · 0 评论 -
Cannot serialize session attribute indexView for session
Java web:服务器可能为了持久化,把session中的对象序列化到本地,但是这个session中的对象,必须要序列化,否则将报这个错误。解决办法:关闭服务器session的序列化,或者把类序列化。原创 2016-06-06 11:06:23 · 869 阅读 · 0 评论 -
primefaces 实现保存主题,使主题应用于所有JSF页面
$(function() { //该el表达式失效 //PrimeFaces.changeTheme('${sessionScope.theme == null?"swanky-purse":sessionScope.theme}'); $.ajax({ type:"post", url:"currentTheme.do", dataType:"text", success:原创 2016-06-07 03:45:29 · 744 阅读 · 0 评论 -
java web 设置持久session
当浏览器支持cookie的时候,设置服务器端的session周期是不够的,因为浏览器是以会话周期为限保存JSESSIONID的。如果如果想长时间的真正保存session需要设置服务器端的session期限,同时设置浏览器端的cookie为JSESSIONID的期限,才能在浏览器和服务器一致。(每次浏览器访问服务器的时候,都会传递cookies给服务器,而JSESSIONID代表session在co原创 2016-06-07 11:00:57 · 1768 阅读 · 0 评论 -
mybatis配置文件错误:jdbcType=? ?类型必须大写
#{channel,jdbcType=CHAR} mybatis大写类型原创 2016-09-09 16:20:38 · 2258 阅读 · 0 评论 -
java web,a part of APIs' Value
===========HttpServletRequest==============AuthType := nullCharacterEncoding := UTF-8ContentLength := -1ContentType := nullContextPath := /PFMLocalAddr := 127.0.0.1LocalName := 127.0.0.1LocalP原创 2016-10-25 11:54:12 · 311 阅读 · 0 评论