Hibernate 5-1 to many (1:n)-fetch="select"-lazy="false"

1. Create a project with the name hibernatedemo23 and the directory structure as shown in the figure.2. Create a lib directory in the project to store jar files. The directory structure is shown in the figure.3. Create the entity class Forum, package name (com.mycompany.demo.bean) in the src directory, as shown in the figure4. The content of th ...

Posted by brewfan9 on Tue, 12 Feb 2019 17:06:19 -0800

A Simple Case of Implementing lazyout Component by struts+hibernate+oracle+easyui-Emp Entity Class and Corresponding Configuration Information

Easyui is a powerful plug-in in jquery. We often encounter complex layout or write a lot of code when implementing a function, such as paging, so easyui's datagrid will replace it. Now I briefly share several cases. First, we create an employee's entity class and paste Emp.hbm generated by hibernate in reverse. The code is complete, so as to a ...

Posted by 1veedo on Tue, 12 Feb 2019 00:09:20 -0800

Hibernate 5 - Multi-to-1(n:1)-fetch="join"

1. Create a project with the name hibernatedemo26 and the directory structure as shown in the figure.2. Create a lib directory in the project to store jar files. The directory structure is shown in the figure.3. Create the entity class Forum, package name (com.mycompany.demo.bean) in the src directory, as shown in the figure4. The content of th ...

Posted by JoeF on Mon, 11 Feb 2019 17:45:18 -0800

Java JDBC Connection SQL Server 2005 Error: TCP/IP Connection Failed to Connect to Host localhost via Port 1433

The reasons for the error are as follows: Exception in thread "main" org.hibernate.exception.JDBCConnectionException: Cannot open connection at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:99) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.exception.JDBCExc ...

Posted by strangebeer on Sun, 10 Feb 2019 18:54:18 -0800

Spring-Boot has Transaction marked as rollback only exception

Recently, in the process of development, we encountered the problem of using Transaction marked as rollback only. We learned the reasons for the error: It should be an error caused by multiple rollbacks of transactions. Looking at the code carefully, because the project has opened a transaction in aop aspect, contro ...

Posted by hrdyzlita on Tue, 05 Feb 2019 19:15:16 -0800

Comparison of Spring's jdbcTemplate with original jdbc's DBUtils and Hibernate integrating c3p0

Using User as the Operating Object package com.swift.jdbc; public class User { private Long user_id; private String user_code; private String user_name; private String user_password; private String user_state; public User() { super(); // TODO Auto-generated constructor ...

Posted by mkoga on Tue, 05 Feb 2019 07:12:17 -0800

Java Generics Review

First, what is generics?Java generic design principle: As long as there is no warning at compile time, there will be no ClassCastException exception at run time. Generics: Delay typing until you create an object or call a method to specify a particular type Parametric types: E in ArrayList < E > is called type parameter variableInteger in ...

Posted by kingdm on Wed, 30 Jan 2019 00:48:14 -0800

Sprboot project usage (2) -- javax.validation

In the last article, we integrated swagger ui and built a restful-style interface. When doing logic processing, we must first do parameter verification. This article describes the use of javax.validation for parameter verification. 1. Create a new entity class with the annotation of javax.validation import org.hibernate.validator.c ...

Posted by ceanth on Tue, 08 Jan 2019 22:33:09 -0800

Reprint Android Input Subsystem: Input Event Generation, Read and Distribution, InputReader, InputDispatcher

EventHub: InputManagerService: In the last blog post Android Input Subsystem: Creation of Input Process, Listening for Thread Startup In this article, we learned about the Android Input system event monitoring module and learned that InputReader starts listening for events from EventHub when InputManagerService starts. Today, ...

Posted by BITRU on Tue, 01 Jan 2019 12:45:08 -0800

J2EE hibernate 4 Learning Notes (XVIII) -- hibernate Advanced Configuration (log4j Configuration Log Framework)

hibernate comes with a simple logging framework. Here we introduce a powerful logging framework log4j. Baidu Encyclopedia's introduction to log4j is very good. Most of the content below is copied from Baidu Encyclopedia. Introduction to log4j (Baidu Encyclopedia) Log4j is Apache An open source project, using Log4j, we can control the destinat ...

Posted by xt3mp0r~ on Wed, 19 Dec 2018 17:30:04 -0800