- 博客(500)
- 收藏
- 关注
原创 spring boot定时任务每次都运行了两次
在项目中有两个如何的文件,删除掉第二个(ServletInitializer.java)就可以了。
2020-08-07 13:55:00
561
1
转载 Hibernate继承与多态查询-subclass
public class Person { private Integer id; private String name; private Integer age;}public class Worker extends Person{ private String job; private String unit;}hibernate为我们提供了三种形式
2017-01-07 18:55:12
1393
转载 CSS浮动(float,clear)
首先要知道,div是块级元素,在页面中独占一行,自上而下排列,也就是传说中的流。如下图: <!DOCTYPE html><html><head> <title></title></head><body> <div style="width:100px;height:100px;background-color:red;">div1</div> <div style=
2016-01-25 00:48:51
1042
转载 CSS块级元素、内联元素概念
文档流将窗体自上而下分成一行行, 并在每行中按从左至右的顺序排放元素,即为文档流。 每个非浮动块级元素都独占一行, 浮动元素则按规定浮在行的一端。 若当前行容不下, 则另起新行再浮动。 内联元素也不会独占一行。 几乎所有元素(包括块级,内联和列表元素)均可生成子行, 用于摆放子元素。 有三种情况将使得元素脱离文档流而存在,分别是浮动,绝对定位, 固定定位。 但是在IE中浮动元素也存在于文档流中
2016-01-24 23:06:41
757
转载 CSS float 属性
实例把图像向右浮动:img{ float:right;}浏览器支持所有主流浏览器都支持 float 属性。 注释:任何的版本的 Internet Explorer (包括 IE8)都不支持属性值 “inherit“。定义和用法float 属性定义元素在哪个方向浮动。以往这个属性总应用于图像,使文本围绕在图像周围,不过在 CSS 中,任何元素都可以浮动。浮动元素会生成一个块级框,而不论它本身是
2016-01-24 22:45:02
952
转载 CSS float和absolute
position:absolute 与float:left 有两大共性:包裹性,破坏性。包裹性包裹性即让元素inline-block化,例如一个div标签默认宽度是100%显示的,但是使用了absolute属性,则100%默认宽度就会变成自适应内部元素的宽度。<!DOCTYPE html><html><head> <meta http-equiv="Content-Type" cont
2016-01-24 01:43:22
2576
转载 Spring Security + Hibernate Annotation Example
In this tutorial, previous Spring Security + Hibernate4 XML example will be reused, and convert it to a annotation-based example.Technologies used :Spring 3.2.8.RELEASESpring Security 3.2.3.RELEASEH
2015-08-24 15:42:42
1192
转载 Spring Security + Hibernate XML Example
In this tutorial, we will show you how to integrate Hibernate 4 in Spring Security, XML configuration example.Technologies used :Spring 3.2.8.RELEASESpring Security 3.2.3.RELEASEHibernate 4.2.11.Fin
2015-08-24 15:36:51
987
转载 Spring Security password hashing example
In this tutorial, we will show you how to use BCryptPasswordEncoder to hash a password and perform a login authentication in Spring Security.In the old days, normally, we used MD5 Md5PasswordEncoder or
2015-08-24 14:56:44
1265
转载 Spring Security Remember Me Example
In this tutorial, we will show you how to implement “Remember Me” login feature in Spring Security, which means, the system will remember the user and perform automatic login even after the user’s sess
2015-08-24 14:35:53
1512
转载 Spring Security : limit login attempts example
In this tutorial, we will show you how to limit login attempts in Spring Security, which means, if a user try to login with an invalid password more than 3 times, the system will lock the user and make
2015-08-24 13:03:55
968
转载 Spring Security form login using database
In this tutorial, we will show you how to perform database authentication (using both XML and Annotations) in Spring Security.Technologies used :Spring 3.2.8.RELEASESpring Security 3.2.3.RELEASESpri
2015-08-24 12:03:15
1606
转载 Spring Security Custom Login Form Annotation Example
In this tutorial, we will convert previous Spring Security custom login form (XML) project to a pure annotation-based project.Technologies used :Spring 3.2.8.RELEASESpring Security 3.2.3.RELEASEEcli
2015-08-24 11:51:32
1626
转载 Spring Security Custom Login Form Example
By default, if no login form is specified, Spring Security will create a default login form automatically. In this tutorial, we will show you how to create a custom login form for Spring Security (XML
2015-08-24 11:41:38
1602
转载 Spring Security Hello World Annotation Example
In preview post, we are using XML files to configure the Spring Security in a Spring MVC environment. In this tutorial, we are going to show you how to convert the previous XML-base Spring Security pro
2015-08-24 11:24:59
1210
转载 Listener介绍
当web运用在web容器中运行时,会产生各种事件(如web启动,停止,用户的session创建,销毁,请求到达等)这些对于web事件开发者都可以监听到。使用Listener只需要2个步骤1)定义Lisenter实现类 package com.listener; import javax.servlet.ServletContextEvent; import javax.s
2015-08-24 10:16:18
692
转载 Servlet中的过滤器Filter详解
web.xml中元素执行的顺序listener->filter->struts拦截器->servlet。1.过滤器的概念Java中的Filter并不是一个标准的Servlet ,它不能处理用户请求,也不能对客户端生成响应。 主要用于对HttpServletRequest进行预处理,也可以对HttpServletResponse进行后处理,是个典型的处理链。 优点:过滤链的好处是,执行过程中任何时候
2015-08-24 10:07:07
601
转载 Spring Security hello world example
In this tutorial, we will show you how to integrate Spring Security with a Spring MVC web application to secure a URL access. After implementing Spring Security, to access the content of an “admin” pag
2015-08-24 09:57:26
671
转载 Spring Named Parameters examples in SimpleJdbcTemplate
In JdbcTemplate, SQL parameters are represented by a special placeholder “?” symbol and bind it by position. The problem is whenever the order of parameter is changed, you have to change the parameters
2015-08-23 22:23:49
497
转载 Spring SimpleJdbcTemplate batchUpdate() example
In this tutorial, we show you how to use batchUpdate() in SimpleJdbcTemplate class.See batchUpdate() example in SimpleJdbcTemplate class.//insert batch examplepublic void insertBatch(final List<Custom
2015-08-23 22:18:03
772
转载 Spring SimpleJdbcTemplate Querying examples
Here are few examples to show how to use SimpleJdbcTemplate query() methods to query or extract data from database. In JdbcTemplate query(), you need to manually cast the returned result to desire obje
2015-08-23 22:15:53
720
转载 Spring JdbcTemplate batchUpdate() example
In some cases, you may required to insert a batch of records into database in one shot. If you call a single insert method for every record, the SQL statement will be compiled repeatedly and causing yo
2015-08-23 22:09:44
696
转载 Spring JdbcTemplate Querying examples
Here are few examples to show you how to use JdbcTemplate query() methods to query or extract data from database.1. Querying for Single RowHere’s two ways to query or extract a single row record from d
2015-08-23 22:04:30
510
转载 文章标题
In Spring JDBC development, you can use JdbcTemplate and JdbcDaoSupport classes to simplify the overall database operation processes.In this tutorial, we will reuse the last Spring + JDBC example, to s
2015-08-23 21:51:34
390
转载 Spring + JdbcTemplate + JdbcDaoSupport examples
In Spring JDBC development, you can use JdbcTemplate and JdbcDaoSupport classes to simplify the overall database operation processes.In this tutorial, we will reuse the last Spring + JDBC example, to s
2015-08-23 18:56:56
555
转载 Spring + JDBC example
In this tutorial, we will extend last Maven + Spring hello world example by adding JDBC support, to use Spring + JDBC to insert a record into a customer table.1. Customer tableIn this example, we are u
2015-08-23 15:14:11
354
转载 Spring Object/XML mapping example
The Spring’s Object/XML Mapping, is converting Object to XML or vice verse. This process is also known asXML Marshalling – Convert Object to XML.XML UnMarshalling – Convert XML to Object.In this tut
2015-08-23 15:06:34
897
转载 Spring PropertyPlaceholderConfigurer example
Often times, most Spring developers just put the entire deployment details (database details, log file path) in XML bean configuration file as following :<beans xmlns="http://www.springframework.org/sc
2015-08-21 15:21:16
473
转载 Spring inject Date into bean property – CustomDateEditor
Spring example to show you how to inject a “Date” into bean property.package com.mkyong.common;import java.util.Date;public class Customer { Date date; public Date getDate() { return date
2015-08-21 15:16:36
646
转载 Spring MapFactoryBean example
The ‘MapFactoryBean‘ class provides developer a way to create a concrete Map collection class (HashMap and TreeMap) in Spring’s bean configuration file.Here’s a MapFactoryBean example, it will instanti
2015-08-21 15:06:29
928
转载 Spring SetFactoryBean example
The ‘SetFactoryBean‘ class provides developer a way to create a concrete Set collection (HashSet and TreeSet) in Spring’s bean configuration file.Here’s a ListFactoryBean example, it will instantiate a
2015-08-21 15:02:10
685
转载 Spring ListFactoryBean example
The ‘ListFactoryBean‘ class provides developer a way to create a concrete List collection class (ArrayList and LinkedList) in Spring’s bean configuration file.Here’s a ListFactoryBean example, it will
2015-08-21 14:56:42
726
转载 Spring Collections (List, Set, Map, and Properties) example
Spring examples to show you how to inject values into collections type (List, Set, Map, and Properties). 4 major collection types are supported : - List – - Set – - Map – - Properties – Spring b
2015-08-21 14:51:46
451
转载 Spring 3 JavaConfig example
Since Spring 3, JavaConfig features are included in core Spring module, it allow developer to move bean definition and Spring configuration out of XML file into Java class. But, you are still allow to
2015-08-21 14:48:08
432
转载 Spring bean scopes example
In Spring, bean scope is used to decide which type of bean instance should be return from Spring container back to the caller.5 types of bean scopes supported : - singleton – Return a single bean inst
2015-08-21 14:44:08
445
转载 Spring inner bean examples
In Spring framework, whenever a bean is used for only one particular property, it’s advise to declare it as an inner bean. And the inner bean is supported both in setter injection ‘property‘ and constr
2015-08-21 14:33:38
503
转载 How to load multiple Spring bean configuration file
ProblemIn a large project structure, the Spring’s bean configuration files are located in different folders for easy maintainability and modular. For example, Spring-Common.xml in common folder, Spring
2015-08-21 14:30:23
526
转载 How to inject value into bean properties in Spring
In Spring, there are three ways to inject value into bean properties.Normal wayShortcut“p” schemaSee a simple Java class, which contains two properties – name and type. Later you will use Spring to
2015-08-21 14:28:23
909
转载 Spring bean reference example
In Spring, beans can “access” to each other by specify the bean references in the same or different bean configuration file.1. Bean in different XML filesIf you are referring to a bean in different XML
2015-08-21 14:25:24
507
转载 Constructor injection type ambiguities in Spring
In Spring framework, when your class contains multiple constructors with same number of arguments, it will always cause the constructor injection argument type ambiguities issue.ProblemLet’s see this c
2015-08-21 14:21:18
434
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人