- 博客(52)
- 收藏
- 关注
转载 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 1144
转载 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 948 1
转载 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 1184
转载 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 1468
转载 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 912
转载 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 1543
转载 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 1584
转载 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 1533
转载 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 1166
转载 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 642
转载 Servlet中的过滤器Filter详解
web.xml中元素执行的顺序listener->filter->struts拦截器->servlet。1.过滤器的概念Java中的Filter并不是一个标准的Servlet ,它不能处理用户请求,也不能对客户端生成响应。 主要用于对HttpServletRequest进行预处理,也可以对HttpServletResponse进行后处理,是个典型的处理链。 优点:过滤链的好处是,执行过程中任何时候
2015-08-24 10:07:07 565
转载 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 624
转载 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 468
转载 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 740
转载 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 682
转载 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 631
转载 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 474
转载 文章标题
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 359
转载 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 531
转载 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 328
转载 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 859
转载 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 434
转载 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 594
转载 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 885
转载 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 645
转载 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 676
转载 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 412
转载 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 402
转载 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 411
转载 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 469
转载 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 482
转载 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 867
转载 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 470
转载 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 394
转载 Spring DI via constructor
Uses Spring to dependency inject a bean via constructor.1. IOutputGeneratorAn interface and implementation class of it.package com.mkyong.output;public interface IOutputGenerator{ public void gene
2015-08-21 14:16:23 325
转载 Spring DI via setter method
A simple Spring example to show you how to dependency inject a bean via setter method, the most common used DI method.1. IOutputGeneratorAn interface and implemntation class of it.package com.mkyong.ou
2015-08-21 14:14:34 305
转载 Spring Dependency Injection (DI)
In Spring frameowork, Dependency Injection (DI) design pattern is used to define the object dependencies between each other. It exits in two major types : - Setter Injection - Constructor Injection1.
2015-08-21 14:12:40 345
转载 Spring 3 JavaConfig @Import example
Normally, you will split a large Spring XML bean files into multiple small files, group by module or category, to make things more maintainable and modular. For example,<beans xmlns="http://www.springf
2015-08-21 14:09:45 723
转载 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:04:50 452
转载 Spring 3 hello world example
This tutorial shows you how to create a simple hello world example in Spring 3.0. Technologies used in this article :Spring 3.0.5.RELEASEMaven 3.0.3Eclipse 3.6JDK 1.6.0.13 P.S Spring 3.0, at leas
2015-08-21 14:01:54 507
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人