- 博客(141)
- 收藏
- 关注
转载 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-09-23 10:08:39
471
转载 Spring Security Authentication Provider
1. OverviewThis tutorial will show how to set up an Authentication Provider in Spring Security to allow for additional flexibility compared to the standard scenario using a simple UserDetailsService.2.
2015-09-22 17:17:16
916
转载 Custom Authentication Provider in Spring
The Spring Security module supports by default some standard ways to retrieve user information for authentication from databases, LDAP or other commonly used storages. But unfortunately the Spring docu
2015-09-22 17:05:06
657
转载 Spring 3 MVC hello world example
In this tutorial, we show you a Spring 3 MVC hello world example, using Maven build tool.Technologies used :Spring 3.2.13.RELEASEMaven 3JDK 1.6Eclipse 4.4Boostrap 31. Project StructureDownload th
2015-09-22 16:53:21
340
转载 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-09-22 15:58:32
338
转载 Hibernate Criteria 多层次查询关联问题
hibernate存在如下表及关联: class House{ private string houseid; private string housename; } class Shelf{ private string shelfid; private House house; } class Position{ private strin
2015-09-22 13:08:12
454
转载 Different between session.get() and session.load()
Often times, you will notice Hibernate developers mix use of session.get() and session.load(), do you wonder what’s the different and when you should use either of it?Different between session.get() an
2015-09-22 12:54:06
292
转载 Spring MVC How take the parameter value of a GET HTTP Request in my controller method?
In this periodo I am studing the Spring MVC showcase example (downloadable from STS dasboard) and I have some simple question about the “Request Mapping” examples:1) In my home.jsp page I have this lin
2015-09-22 11:54:56
494
转载 Sending redirect to another servlet/JSP without loosing the request parameters
How do i specify a redirection to another servlet, in the doPost() method of a servlet. at the moment I’m usingrequest.getRequestDispatcher("/WEB-INF/products.jsp").forward(request, response);which is
2015-09-22 11:43:19
465
转载 Spring RedirectAttributes: addAttribute vs addFlashAttribute
My understanding so far is on our controller request mapping method we can specify RedirectAttributes parameter and populate it with attributes for when the request get redirected, eg:@RequestMapping(v
2015-09-22 11:40:32
2856
转载 Spring MVC 中的 forward 和 redirect
Spring MVC 中,我们在返回逻辑视图时,框架会通过viewResolver来解析得到具体的 View,然后向浏览器渲染。假设逻辑视图名为hello,通过配置,我们配置某个 ViewResolver如下: <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <descrip
2015-09-22 11:32:18
277
转载 response.sendRedirect()与request.getRequestDispatcher().forward()区别
JSP中response.sendRedirect()与request.getRequestDispatcher().forward(request,response)这两个对象都可以使页面跳转,但是二者是有很大的区别的,分条来说,有以下几点:①response.sendRedirect(url)—–重定向到指定URL request.getRequestDispatcher(url).forw
2015-09-22 11:23:14
366
转载 Spring MVC form handling example
In this tutorial, we will show you a Spring MVC form handling project to do the following stuff :Form value binding – JSP and Model.Form validation and display error message.Form POST/REDIRECT/GET p
2015-09-22 10:37:12
623
转载 HibernateTransactionManager事务管理
配置JdbcTemplate:先配置数据源: <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver" />
2015-09-21 17:31:01
1062
转载 Spring管理Hibernate事务
1、TransactionProxyFactoryBean<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://
2015-09-21 16:42:31
246
转载 Spring AOP transaction management in Hibernate
Transaction management is required to ensure the data integrity and consistency in database. Spring’s AOP technique is allow developers to manage the transaction declarative.Here’s an example to show h
2015-09-21 16:20:15
334
转载 Spring with Hibernate persistence and transactions example
In this tutorial you will learn how to implement Hibernate persistence using the Spring framework in a transactional fashion.IntroductionAfter reading this tutorial you will be able to implement Hibern
2015-09-21 15:56:32
308
转载 @Transactional in Spring+Hibernate
I an using Spring 3.1 + Hibernate 4.x in my web application. In my DAO, i am saving User type object as followingsessionFactory.getCurrentSession().save(user);But getting following exception:org.hibern
2015-09-21 14:59:54
272
转载 PROPAGATION_REQUIRED事务管理
PROPAGATION_REQUIRED事务采用编程式事务 1、 getCurrentSession()与openSession()的区别?采用getCurrentSession()创建的session会绑定到当前线程中,而采用openSession()创建的session则不会采用getCurrentSession()创建的session在commit或rollback时会自动关闭,而采用o
2015-09-21 14:07:20
1557
转载 org.hibernate.HibernateException: save is not valid without active transaction
I am creating JSF application and using some hibernate stuff in it. All I want to do is to save the entity into the database but I keep getting this exception:org.hibernate.HibernateException: save is
2015-09-21 13:41:59
1317
转载 getCurrentSession hibernate in web
I am writing a web based application with hibernate and jsp/servlet. I have read about the sessionFactory.getCurrentSession and sessionFactory.openSession methods. I know the basic difference between t
2015-09-21 13:36:12
246
转载 Hibernate SessionFactory getCurrentSession is not valid without active transaction
I am facing one problem in Hibernate. Here is the code. Configuration cfg = new Configuration().configure(); SessionFactory factory = cfg.buildSessionFactory(); Session session = factory.ope
2015-09-21 13:23:18
652
转载 Spring MVC hello world annotation example
In this tutorial, we will take the previous Spring MVC hello world XML-based, and convert it to a annotation-based project.Technologies used :Spring 2.5.6JDK 1.6Maven 3Eclipse 3.61. Directory Stru
2015-09-21 11:17:10
274
转载 文章标题
A Visual Explanation of SQL Joins I thought Ligaya Turmelle’s post on SQL joins was a great primer for novice developers. Since SQL joins appear to be set-based, the use of Venn diagrams to explain th
2015-09-18 16:55:09
225
转载 Hibernate: Understanding Lazy Fetching
The Good, The Bad, and The UglyOne of the potential problems with object/relational mapping is that a lot of work has to be done to convert relational results into object results. Because of the nature
2015-09-18 16:54:46
389
转载 Hibernate Eager vs Lazy Fetch Type
BackgroundThe topic of Fetch types in Hibernate is a fairly advanced topic, as it requires you to have a decent understanding of the Java programming language, as well as have had exposure to SQL and t
2015-09-18 14:07:27
394
转载 Hibernate – fetching strategies examples
Hibernate has few fetching strategies to optimize the Hibernate generated select statement, so that it can be as efficient as possible. The fetching strategy is declared in the mapping relationship to
2015-09-18 13:54:41
243
转载 What is the difference between left join and left outer join?
<join_type> ::= [ { INNER | { { LEFT | RIGHT | FULL } [ OUTER ] } } [ <join_hint> ] ] JOINThe keyword OUTER is marked as optional (enclosed in square brackets), and what this means in this cas
2015-09-18 13:36:23
636
转载 What is the difference between a left outer join and a right outer join?
It is best to illustrate the differences between left outer joins and right outer joins by use of an example. Here we have 2 tables that we will use for our example: For the purpose of our example, it
2015-09-18 13:05:42
459
转载 In SQL, what’s the difference between a full join and an inner join?
A brief explanation of a joinLet’s start with a quick explanation of a join. Joins are used to combine the data from two tables, with the result being a new, temporary table. The temporary table is cre
2015-09-18 12:56:18
369
转载 In SQL, what is the difference between a left join and a left outer join?
There is actually no difference between a left join and a left outer join – they both refer to the exact same operation in SQL. An example will help clear this up.Here we have 2 tables that we will use
2015-09-18 12:44:14
360
转载 How to Identify and Resolve Hibernate N+1 SELECT's Problems
Let’s assume that you’re writing code that’d track the price of mobile phones. Now, let’s say you have a collection of objects representing different Mobile phone vendors (MobileVendor), and each vendo
2015-09-18 12:33:17
249
转载 Spring AOP - AspectJ - @AfterThrowing example
Last few pages talked about spring advices (before advice, after return advice, around advice and pointcut examples). In this page you will get an idea about how to integrate AspectJ annotations with S
2015-09-17 17:31:32
546
转载 How to get spring application context object reference?
This page gives an example to get spring application context object with in non spring managed classes as well. It is not possible to have all classes as spring managed classes, in such classes you nee
2015-09-17 17:26:37
355
转载 Struts 2 execAndWait interceptor example
Struts 2 comes with a very interesting “Execute and Wait” interceptor named “execAndWait“, it’s a very convenient interceptor for long running actions in the background while showing the user an custom
2015-09-17 17:21:19
480
转载 Struts 2 creating own interceptor
In this tutorial, it shows how to create an own interceptor in Struts 2.Summary steps :Create a class implements com.opensymphony.xwork2.interceptor.Interceptor.Implement the intercept(ActionInvocati
2015-09-17 16:39:53
235
转载 Struts 2 interceptor stack example
Often times, same set of interceptors may apply to different action classes, for example,<package name="default" namespace="/" extends="struts-default"> <action name="checkInAction" class="com.
2015-09-17 16:18:34
251
转载 Struts 2 override the interceptor parameters
In Struts 2, you can set or override the interceptor parameters via the generic <param> tag. See below example<package name="default" namespace="/" extends="struts-default"> <action name="whateverAc
2015-09-17 16:15:36
263
转载 Struts 2 mapping interceptors to action
Struts 2 developers are used to declare the actions belong to a package that extend the “struts-default“, which contains the default set of interceptors.<package name="default" namespace="/" extends="s
2015-09-17 16:13:20
256
转载 org.springframework.aop Interface ThrowsAdvice
public interface ThrowsAdviceextends AfterAdviceTag interface for throws advice.There are not any methods on this interface, as methods are invoked by reflection. Implementing classes must implement m
2015-09-17 15:59:13
350
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人