自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(64)
  • 收藏
  • 关注

原创 Factory method 'eurekaClient' threw exception; nested exception is java.lang.RuntimeException: Faile

报错org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.eurekaClient' defined in class path resource [org/springframework/cloud/netflix/eureka/EurekaCl...

2019-09-24 18:36:40 9440 2

原创 Vue学习

Vue实例学习目录引入vue.js建Vue实例目录index.htmlvue.js引入vue.js <script src="./vue.js"></script>全文<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title...

2019-08-03 23:28:15 152

原创 spring boot 部署外部tomcat

一、部署在外部tomcat1、pom.xml<packaging>war</packaging>2、pom.xml <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter...

2019-08-03 15:10:32 194

原创 spring boot两个以上数据库

spring boot两个以上数据库项目目录application-yml 文件配置第一个数据库文件FirstDataSourceConfig.java配置第二个数据库文件SecondDataSourceConfig.java项目目录src/main/javacom.datasource.configFirstDataSourceConfig.javaSecondDataSourc...

2019-08-02 22:56:55 444

原创 tomcat设置为系统服务自动启动

cmd =》cd 到tomcat的bin文件中,然后执行service install 自定义名执行完成就可以到系统服务器启动tomcat,配置自动启动

2019-03-11 15:18:37 399

原创 删除数据表里的数据和重置自生成id

truncate table tableName

2019-03-09 11:44:25 738

原创 SQL server函数

#左边补零//select right(REPLICATE('0',20-len(sn))+sn,20) as sn from user#判断字符串是不是数字//等于0则是纯数字,非0则不是纯数字where patindex('%[^0-9]%',sn) = 0 //支持正负数字和小数点where patindex('%[^0-9|.|-|+]%',sn) = 0 ...

2018-12-14 15:24:17 355

原创 查看索引使用情况

select db_name(database_id) as N’TOPK_TO_DEV’, --库名object_name(a.object_id) as N’TopProjectNew’, --表明b.name N’索引名称’,user_seeks N’用户索引查找次数’,user_scans N’用户索引扫描次数’,last_user_seek N’最后查找时间’,last_...

2018-12-12 23:21:09 989

转载 springMvc 将对象json返回时自动忽略掉对象中的特定属性的注解方式

转https://blog.csdn.net/a491857321/article/details/78761857/https://blog.csdn.net/sanjay_f/article/details/47304509

2018-12-02 16:56:24 3174

原创 获取mybatis执行的sql语句

@Autowiredprivate SqlSessionFactory sqlSessionFactory;public int updateByPrimaryKeySelective(AGsJbxx entity) { String sql = sqlSessionFactory.getConfiguration() .getMappedStatement("com.hx.tpa...

2018-09-27 22:02:14 12363

原创 springboot配置属性

spring.autoconfigure.exclude //控制要排除的自动配置类列表 。

2018-09-20 22:07:52 165

原创 spring配置数据库报错org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.demo.dao.EntityMapper.selectByExample at org.apache.ibatis.binding.MapperMethod$SqlCommand.&lt;init&gt;(MapperMeth...

2018-09-20 17:03:06 135

原创 springboot修改文件后自动重新启动

在pom.xml加&lt;!-- 热启动,修改会自动重启 --&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt; &lt;artifactId&gt;spring-boot-devtools&lt;/artifactId&gt;...

2018-09-20 16:34:08 4539

原创 springboot 配置数据库报错

spring boot 部署数据库报错 . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__...

2018-09-20 15:35:51 598

转载 springmv重定向

controller跳到另外一个controller: 转:https://www.cnblogs.com/henuyuxiang/p/6933381.html

2018-09-17 10:56:10 434

原创 同时运行两个以上的tomcat

修改tomcat/conf/server.xml文件&lt;Server port="8005" shutdown="SHUTDOWN"&gt;//修改跟之前tomcat不同的端口,未用使用的端口&lt;Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000"

2018-09-16 20:13:10 195

原创 修改Tomcat运行窗口名

tomcat/bin/catalina.bat文件if "%TITLE%" == "" set TITLE=正式Tomcat//修改TITLE

2018-09-16 20:08:36 131

转载 controller接收列表参数,List<Entity>

转https://blog.csdn.net/lightofsms/article/details/80722034$.ajax请求加请求头contentType: 'application/json;charset=utf-8'var data =[];data.push({username: "yss"});$.ajax({ type: "post", url: "...

2018-09-14 21:22:17 3815

原创 对象属性值为null时,不返回该对象属性

在对象名上注解@JsonInclude(JsonInclude.Include.NON_NULL)

2018-09-13 20:52:41 8216 2

原创 前端传参给后台,转数据格式

在controller类中@InitBinderpublic void initBinder(WebDataBinder binder) { binder.registerCustomEditor(String.class, new StringFormat());} class StringFormat extends PropertyEditorSupport{ ...

2018-09-13 20:50:55 2700

原创 事务回滚

1、首先在spring配置文件中配置&amp;lt;!-- 开启事务 --&amp;gt; &amp;lt;bean id=&quot;transactionManager&quot; class=&quot;org.springframework.jdbc.datasource.DataSourceTransactionManager&quot;&amp;gt; &amp;lt;property nam

2018-09-13 20:35:44 158

原创 iframe操作父级元素

var top = $(window.parent.document).find("#nav-top");$(top).find("li.active&gt;i").click();

2018-09-06 20:36:27 1797

原创 锁定浏览器页面后退按钮

history.pushState(null, null, document.URL); window.addEventListener(‘popstate’, function () { history.pushState(null, null, document.URL); });

2018-09-06 20:32:44 286

原创 mybatis自增长主键

1、sqlserver数据库,如果设置了主键自增长,就不在插入语句中插入主键,否则报错。 2、如果想在插入成功后获取自增长主键ID,需要在mybatis映射文件的插入配置加useGeneratedKeys=”true” keyProperty=”id”,否则插入成功后不能立刻获得自增长ID&lt;insert id="insert" parameterType="com.model.loc....

2018-09-01 15:18:55 879

原创 后台时date类型传到前端变数字的解决方法

在要传到前端的类的date属性上加注解,这样到前端就不会变数字了@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")

2018-09-01 14:47:01 3787

原创 JSON报错 SyntaxError: JSON.parse: expected property name or '}' at line 1 column 2 of the JSON data

String jsonRedirect = "{code:-101, msg:'没操作权限'}";//这里有错response.setContentType("application/json; charset=utf-8");response.getWriter().println(jsonRedirect );解决:改用双引号String jsonRedirect = "{\...

2018-08-30 23:21:14 11692

原创 json 转换错误:JSON.parse expected property name or '}'

String jsonRedirect = "{code:-101, msg:'没操作权限'}";response.setContentType("application/json; charset=utf-8");response.getWriter().println(jsonRedirect);解决:String jsonRedirect = "{\"code\":-101...

2018-08-30 22:40:53 5601

原创 AdminLte DataTables warning: table id=table-data - Ajax error. For more information about this error

这个错误一般是colunm的赋值时有clounm的数据名没有对应的数据。

2018-08-29 22:58:00 4177 1

原创 AdminLte的常用方法

//制作表单var oTable = $('#table-data').dataTable({ serverSide:false, paging : false, //是否分页 searching: false, //是否查询 scrollY:&amp;amp;amp;amp;quot;200&amp;amp;amp;amp;quot;, //滚动条 scrol...

2018-08-29 21:24:43 4915

原创 根据方法名调用函数 eval传对象

根据方法名调用方法var obj = {"name":"张三","age",14};var funcName = "funcName";eval(funcName+"(obj);");//对象要在括号里不能用引号括着,如果参数是字符串则要用引号括着...

2018-08-29 21:13:44 1552

原创 内网电脑访问不了另外一台电脑启动的服务器,跨域问题

服务器启动,前端同事访问不了,也检查防火墙,开了防火墙,还是访问不了,地址也没问题,后来发现是跨域问题。解决方法:public class SimpleCORSFilter implements Filter { protected final Logger log = LoggerFactory.getLogger(getClass()); @Override ...

2018-08-23 20:51:30 6033

原创 设置web项目启动默认页面为controller方法

配置默认访问controller方法方法一: 在mvc配置文件中配置&lt;!-- 定义无Controller的path&lt;-&gt;view直接映射 --&gt;&lt;mvc:view-controller path="/" view-name="redirect:login" /&gt;在web.xml配置文件中配置&lt;welcome-file-list&gt...

2018-08-19 16:24:51 8943 5

原创 jsp注意项

1、设置radio选中时,用attr(“checked”,true)方法无效,需要用prop(“checked”,true)方法来设置。

2018-08-19 13:56:17 123

原创 jquery用attr("checked","checked")没有选中效果

要用prop()方法 $(“input[type=’radio’] [value=’0’]”).prop(“checked”,true);

2018-08-19 13:54:19 2390

原创 jsp遍历对象属性

var data = {"name":"张三","age":50};for(pro in data){}

2018-08-19 11:47:06 1714

原创 加service方法上加@Transactional注解,报错but was actually of type [com.sun.proxy.$Proxy116]

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'admUserController': Unsatisfied dependency expressed through field 'admUserService'; nested exception i...

2018-08-18 17:38:03 1555 1

原创 15:50:05 烨 2018/8/18 15:50:05 Parameter 'id' not found. Available parameters are [list]

报错: nested exception is org.apache.ibatis.executor.ExecutorException: Error getting generated key or setting result to parameter object. Cause: org.apache.ibatis.binding.BindingException: Paramete...

2018-08-18 16:31:05 283

原创 mybaits批量插入1000条报错

在数据库能支持1000条批量插入,但在mybatis中就不支持了,提示支持最多2100参数,不知道这参数是怎么算的,目前测试320条是可以的,不知会不会因为不同表的插入而有所不同。 备注:用这种方式批量导入时要测试一次性能导入几条。...

2018-08-18 16:26:50 1661

原创 mybatis的批量插入

&lt;insert id="insertBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id"&gt; &lt;!-- WARNING - @mbg.generated This element is automatically generated by MyB...

2018-08-18 15:00:27 408

原创 批量导入数据遇到的问题(INSERT 语句中行值表达式的数目超出了 1000 行值的最大允许值。)

INSERT 语句中行值表达式的数目超出了 1000 行值的最大允许值。 之前用insert一条一条循环导入, 这样比较费时间,就用 insert into admUser(username, mobile, age) values(,,),(,,),(,,)来批量导入, 导入数据多出现这样的问题INSERT 语句中行值表达式的数目超出了 1000 行值的最大允许值。数据库一次性...

2018-08-18 14:53:18 8438

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除