http://localhost:8080/T216_SSH/vue/userAction_login.action
{"msg":"登录成功","result":{"uname":"zs","pwd":"123"},"code":1}
http://localhost:8080/T216_SSH/vue/treeNodeAction.action
{"msg":"操作成功","result":[{"treeNodeId":1,"treeNodeName":"系统管理","treeNodeType":1,"url":null,"position":1,"icon":"el-icon-setting","children":[{"treeNodeId":2,"treeNodeName":"用户管理","treeNodeType":2,"url":"/sys/VuexPage1","position":2,"icon":"el-icon-user","children":[]},{"treeNodeId":3,"treeNodeName":"角色管理","treeNodeType":2,"url":"/sys/VuexPage2","position":3,"icon":"","children":[]},{"treeNodeId":4,"treeNodeName":"密码修改","treeNodeType":2,"url":null,"position":4,"icon":null,"children":[]}]},{"treeNodeId":5,"treeNodeName":"论坛管理","treeNodeType":1,"url":null,"position":5,"icon":"el-icon-reading","children":[{"treeNodeId":6,"treeNodeName":"文章管理","treeNodeType":2,"url":"/sys/Articles","position":6,"icon":null,"children":[]}]}],"code":1}
http://localhost:8080/T216_SSH/vue/articleAction_list.action
{"msg":"操作成功","result":[{"id":1,"title":"MySQL Tutorial","body":"DBMS stands for DataBase ..."},{"id":2,"title":"How To Use MySQL Efficiently","body":"After you went through a ..."},{"id":3,"title":"Optimising MySQL","body":"In this tutorial we will show ..."},{"id":4,"title":"1001 MySQL Tricks","body":"1. Never run mysqld as root. 2. ..."},{"id":5,"title":"MySQL vs. YourSQL","body":"In the following database comparison ..."},{"id":6,"title":"MySQL Security","body":"When configured properly, MySQL ..."},{"id":8,"title":"阿里与拼多多的增量之战","body":"近日,多家媒体报道阿里内部正考虑将聚划算彻底从淘宝天猫独立出来,成立大聚划算事业群。据传独立后的聚划算将肩负起阿里进攻下沉市场、迎战拼多多的重任"},{"id":9,"title":"lucene工具类","body":"package com.javaxl.p1.utils;\n\nimport java.io.IOException;\nimport java.nio.file.Paths;\n\nimport org.apache.lucene.analysis.Analyzer;\nimport org.apache.lucene"},{"id":10,"title":"lucene案例","body":"对某一表进行索引操作的帮助类package com.javaxl.p1.component;\n\nimport com.javaxl.p1.entity.Blog;\nimport com.javaxl.p1.service.BlogService;\nimport com.javaxl.p1.utils.Date"},{"id":15,"title":"solr简介","body":"solr简单了解下,相较于lucene好处在哪里"}],"code":1,"pageBean":{"page":1,"rows":10,"total":155,"pagination":true,"parameterMap":{},"url":"http://localhost:8080/T216_SSH/vue/articleAction_list.action","startIndex":0,"maxPage":16}}
http://localhost:8080/T216_SSH/vue/articleAction_add.action
{"msg":"新增成功","result":169,"code":169}
http://localhost:8080/T216_SSH/vue/articleAction_edit.action
{"msg":"修改成功","result":4,"code":4}
http://localhost:8080/T216_SSH/vue/articleAction_del.action
{"msg":"删除失败","result":0,"code":0}
3.案例treeNode和user
思路
pom.xml entity 实体类的映射类文件 basedao dao biz bizImpl web层 spring-xxx.xml(spring-bean文件) spring-hibernate.xml spring-context.xml
1.java.lang.IllegalStateException: BeanFactory not initialized or already closed - call ‘refresh’ before accessing beans via the ApplicationContext
解决:显而易见 ApplicationContext applicationContext = new ClassPathXmlApplicationContext("/spring-context.xml"); ("/spring-context.xml")没填
2.org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘bookProxy’: FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘myMethodInterceptor’ at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175)
4.org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sessionFactory’ defined in class path resource [spring-hibernate.xml]: Invocation of init method failed; nested exception is org.hibernate.PropertyNotFoundException: Could not locate getter method for property [com.wxm.user.entity.User#bame](X2)
解决:实体类的映射类(比如book.hbm.xml文件对应的属性不一致)
5.org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘treeNodeBiz’ defined in class path resource [spring-tree.xml]: Cannot resolve reference to bean ‘treeNodeDao’ while setting bean property ‘treeNodeDao’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘treeNodeDao’ available
6. org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sessionFactory’ defined in class path resource [spring-hibernate.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: entity class not found: com.wxm.entity.Book
7.org.springframework.orm.hibernate5.HibernateSystemException: Null value was assigned to a property of primitive type setter of com.wxm.TreeNode.entity.TreeNode.parent_node_id; nested exception is org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.wxm.TreeNode.entity.TreeNode.parent_node_id
8.java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: form near line 1, column 1 [form TreeNode]
解决:仔细检查:是hql语句写错了 关键词from
9.HQL java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: form near line 1, column 1 [form TreeNode]
解决:仔细检查:是hql语句写错了 关键词from
10.org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet
如果在使用JAXB把xml文件unmarshal成vo(XSD自动生成的vo)时碰到如下错误:
org.xml.sax.saxparseexception : premature end of file
很有可能时你直接读取文件为inputstream,然后将inputstream作为构建unmarshal需要的source参数。InputSource inputSource = new In
servlet 搞java web开发的人一定不会陌生,而且大家还会时常用到它。
下面是java官方网站上对servlet的介绍: java官网对于servlet的解释 写道
Java Servlet Technology Overview Servlets are the Java platform technology of choice for extending and enha
这两天学到事务管理这一块,结合到之前的terasoluna框架,觉得书本上讲的还是简单阿。我就把我从书本上学到的再结合实际的项目以及网上看到的一些内容,对声明式事务管理做个整理吧。我看得Spring in Action第二版中只提到了用TransactionProxyFactoryBean和<tx:advice/>,定义注释驱动这三种,我承认后两种的内容很好,很强大。但是实际的项目当中
1)nosql数据库主要由以下特点:非关系型的、分布式的、开源的、水平可扩展的。
1,处理超大量的数据
2,运行在便宜的PC服务器集群上,
3,击碎了性能瓶颈。
1)对数据高并发读写。
2)对海量数据的高效率存储和访问。
3)对数据的高扩展性和高可用性。
redis支持的类型:
Sring 类型
set name lijie
get name lijie
set na
在多节点的系统中,如何实现分布式锁机制,其中用redis来实现是很好的方法之一,我们先来看一下jedis包中,有个类名BinaryJedis,它有个方法如下:
public Long setnx(final byte[] key, final byte[] value) {
checkIsInMulti();
client.setnx(key, value);
ret