Hiberante reverse-generates database tables

1,hibernate.cfg.xml Comment out this section of configuration <!--Update database level automatically--> <!--<property name="hbm2ddl.auto">create</property>--> 2. New Generate Database Table Tool Class public class HibernateSchemaExport { static Session session; static Configuration ...

Posted by rigi2 on Sat, 18 Jul 2020 08:49:13 -0700

MySQL Database Event Timer Execution Task

1. Background Because the business of the project is constantly moving forward, it is unavoidable that the number of tables in the database will become larger and larger, constantly squeezing hard disk space.Business growth cannot be sustained even with the greatest amount of space, so it is necessary to regularly delete unnecessary data.A tab ...

Posted by squizz on Sat, 18 Jul 2020 08:15:03 -0700

Picture deletion for laravel-admin

There is a deep doubt about laravel-admin's picture upload mechanism. Deleting avatar pictures on the user information page will cause an error. It was 1.4 at that time, and later updated 1.5 found that the delete button disappeared directly. If you use image normally in the form during the process of use, the slight ...

Posted by Permutant on Sat, 18 Jul 2020 07:40:26 -0700

java ajax instantly verifies that the same classification exists in the database

When I do the project again, the customer needs me to implement a function, probably when adding classifications, if the database has the same classifications, the jsp interface will prompt for information and cannot be added successfully.The results are as follows:   Below is the idea for implementation: 1. First implement an onblur event in ...

Posted by BLeez on Fri, 17 Jul 2020 09:02:47 -0700

phpmyadmin connects databases on multiple servers at the same time

1. Scenarios for use In general, there are test environments and formal environments for our development.Of course, databases are also separate.If you could use phpmyadmin to directly access mysql on both servers.This is the need. 2. Solutions 1. Find under the phpmyadmin folderConfig.sample.inc.php, renamedConfig.inc.php. 2. OpenConfig. ...

Posted by jpaloyo on Wed, 15 Jul 2020 08:48:28 -0700

linux/window backup mysql database regularly

It is relatively simple for Linux to back up the database regularly. crontab can be used for scheduled backup. If windows is used, it may be troublesome. 1.Linux: Step 1: configure the backup directory code on the server: mkdir /var/lib/mysqlbackup cd /var/lib/mysqlbackup Step 2: write backup script code: vi dbbackup.shPaste the f ...

Posted by jara06 on Tue, 14 Jul 2020 09:05:18 -0700

Mybatis (2) Parameters transfer

Mybatis parameter (Parameters) pass 1.. Single parameter Values of basic type, object type, collection type can be accepted.In this case, MyBatis can use this parameter directly without any processing.   <!-- according to id Query a record in a data table and encapsulate it User object --> <select id="selectById" resultType="com.s ...

Posted by mailtome on Tue, 14 Jul 2020 08:23:04 -0700

Additions and deletions based on Form component and based on ModelForm

Introduction to ModelForm ModelForm a. class Meta: model, # Corresponding Model Of fields=None, # field exclude=None, # Exclusion field labels=None, # Prompt message help_texts=None, ...

Posted by 1337hovie on Wed, 08 Jul 2020 08:39:55 -0700

Additions and deletions based on Form component and based on ModelForm

Introduction to ModelForm ModelForm a. class Meta: model, # Corresponding Model Of fields=None, # field exclude=None, # Exclusion field labels=None, # Prompt message help_texts=None, ...

Posted by Wolphie on Wed, 08 Jul 2020 08:40:24 -0700

[Spring] Pure java for Spring-hibernate integration

First import the corresponding jar package for Spring-hibernate Then prepare the file for the database connectionHibernate.propertiesAlsoJdbc.properties Hibernate.propertiesFile: Configure the hibernate dialect and automatic table building hibernate.dialect=org.hibernate.dialect.H2Dialect hibernate.hbm2ddl.auto=create Jdbc.propertiesFi ...

Posted by mjgdunne on Wed, 08 Jul 2020 07:43:57 -0700