Beginners easy to get started with SSH-struts2 01 environment to build, easy to get started with ssh-struts2
First, SSH is not a framework, but an integration of multiple frameworks (struts + spring + hibernate). It is a popular open-source integration framework for Web applications, it is used to build flexible and scalable multi-layer Web applications.
The systems integrated with the SSH framework are div
, array, operator, etc.), swing,awt, event mechanism, file input and output stream processing, etc.Difficulties: The understanding of object-oriented ideas (interfaces, classes, etc.), threading, socket network programming, etc.Video Tutorial recommended: Xinxin Sun Java Basic Video tutorial, Zhang Xiaoxiang Java Basic Video tutorial, speak very thin, and the two teachers have a good experience in teaching.J2ee:After learning the J2SE, you can try to slowly transition to the Java EE, of course,
Hibernate uses cache (level 1, level 2, and query) to improve system performance and hibernate system performanceIn hibernate, we usually use three types of caches: level-1 cache, level-2 cache, and query cache. Below we will analyze the usage of these three caches in the project, as well as their advantages and disadvantages.
The function of caching is to improv
First, inverse is the basic concept of hibernate bidirectional relationship. The real function of inverse is to specify which side to maintain the association between. When a party specifies "Inverse=false" (the default), then that party is responsible for the relationship, and that is how hibernate generates SQL to maintain the associated records!Hibernate synch
Combined primary key generation policy in Hibernate, hibernate primary keyI. Configure the joint primary key in xml
Design a class separately as the primary key class, such as StudentPK
A. Serializable Interface)
B. Rewrite equals () and hashCode ()
Why do I need to write equals () and hashCode () methods?
The same hashCode is stored in the same location of the hash table. After a specific hashcode is found
What is hibernate lazy loading? When should I load it with laziness? Why should I load it with laziness ?, Hibernate
Lazy is called delayed loading and delayed loading.
When should I load it with laziness? I can only answer the question: When should I load it with laziness.
Why should we use lazy loading? When the amount of data we want to access is too large, it is obviously inappropriate to use the cache,
SSH integration Hibernate uses spring to manage hibernate level two cache, configuring hibernate4.0 above level two cacheHibernate:Hibernate is a persistent layer framework that accesses physical databases frequently.Improve application performance by reducing the frequency of application access to physical data sources.The data in the cache is a copy of the data in the physical data source, the application
Internal execution processPrimary key generator Identity (common)1、表必须支持自动增长机制2、数据库生成主键3、不需要在程序中设置主键Assigned必须通过程序的方式给值才可以person.setId(xxx);一般用于开发的时候测试使用Increment (Common)1、如果选择该主键的生成方式,则必须是数字类型2、先获取主键的最大值,在最大值的基础上加1,形成新的主键3、效率比较低,因为这种方式会先select表中最大的主键值4、主键的生成是由hibernate内部实现的Native会根据不同的数据库选择不用的主键生成策略Uuid1、主键必须是varchar类型2、主键是由hibernate内部生成的3、在持久化类中必须是String类型4 自动生成,无需给值Types of properties in a map fileThere
Getting started with Hibernate (1)-Environment setup and simple example, hibernate setupI. Preface
I complained that I had to learn the framework and did not have time to take notes during this time, but I thought I had to record this knowledge. Enter the topic
1.1 Introduction to Hibernate
What is Hibernate? What is t
[Hibernate] level-1 and level-2 buffering, and hibernate Buffering
Hibernate buffer is divided into two types by level: Session and SessionFactory. Some are also three types, and the other is Query Buffer. Of course, query buffering relies on second-level buffering.
OK. What is buffering?
Open up a space in the memory to store the data in the hard disk. In the f
Q. How do I configure hibernate?A The configuration class uses the Config Hibernate.cfg.xml (or hibernate.properties) and the mapping file *. Hbm.xml to create (for example, configure and boot hibernate) Sessionfactory, and then sessionfactory create an instance of the session. The session instance is the primary interface that the persistence layer service provides externally.Hibernate.cfg.xml (or you can
Beginner Hibernate SearchTo make your app capable of full-text search with Hibernate search, here are three things to do:
Add necessary dependencies and configuration information to the project
Add the necessary information to your entity classes so that Lucene knows how to index them (indexing)
Use the Hibernate search specification query to com
Label:recently began to learn hibernate, looking at Li Gang's "Lightweight Java EE Enterprise application combat." For the first Hibernate program, I wrote down the example of the book and just changed some of the MySQL connection parameters and created a new hibernate database in MySQL, that's all. However, unexpected things happen ... After the program is writt
In fact, hibernate itself is a stand-alone framework that does not require support from any Web server or application server. However, most of the hibernate introductory introductions include many non-hibernate items, such as Tomcat, Eclipse, Log4j,struts, XDoclet, and even JBoss. This makes it easy for people to misunderstand the complexities of
j2ee| Beginners
Java EE more and more learners, the technology of Java-EE is constantly developing, emerging a variety of concepts, this article is an easy to understand the concept of these concepts to the beginners to explain, in order to master the learning direction of Java EE.
The first thing we need to know is that Java and EE are two different concepts, Java is not just a language, has represented a
Basic Hibernate ing and hibernate ing
Before talking about Hibernate ing, let's first take a look at object link ORM ing ORM. The implementation idea of ORM is to map the data of tables in relational databases into objects and present them as objects. In this way, developers can convert database operations to operations on these objects. Let's look at a picture.
Hibernate core interface, hibernate Core
Configuration (AnnotationConfiguration)
Role: Manage configuration information
Objective: To generate SessionFactory
You can specify the hibernate configuration file in the configure method. It is loaded under classpath by default (not specified ).Hibernate. cfg. xmlFile
For hibernate, hibernate. cfg. XML is a very important file. It uses XML format to save some very important parameters, such as database connection information and connection pool:
The following is an example of hibernate. cfg. XML in a project:
Public "-// hibernate/hiberna
Original address: http://www.blogjava.net/pengpenglin/archive/2010/03/15/315440.htmlHibernate has different ways of getting data, and the effect of using it in conjunction with the cache is not the same, but how to use caching in Hibernate is actually a problem that we are concerned about, which is directly related to performance. There are three main aspects of caching in Hibernate: First-level cache, leve
In the previous blog, the caching mechanism of hibernate was introduced. Reasonable configuration of the cache, can greatly optimize the performance of hibernate. This blog introduces another way of tuning: crawl strategy.first, what is a crawl strategyCrawl strategy (fetching strategy): How hibernate gets the policy of the associated object when the application
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.