mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
Fix JPA.
This commit is contained in:
parent
c29098d717
commit
52d684d611
@ -1,5 +0,0 @@
|
|||||||
#HSQL Database Engine 2.7.1
|
|
||||||
#Fri Nov 24 19:26:20 PST 2023
|
|
||||||
modified=yes
|
|
||||||
tx_timestamp=458
|
|
||||||
version=2.7.1
|
|
@ -1,46 +0,0 @@
|
|||||||
SET DATABASE UNIQUE NAME HSQLDB8C04588647
|
|
||||||
SET DATABASE DEFAULT RESULT MEMORY ROWS 0
|
|
||||||
SET DATABASE EVENT LOG LEVEL 0
|
|
||||||
SET DATABASE TRANSACTION CONTROL LOCKS
|
|
||||||
SET DATABASE DEFAULT ISOLATION LEVEL READ COMMITTED
|
|
||||||
SET DATABASE TRANSACTION ROLLBACK ON CONFLICT TRUE
|
|
||||||
SET DATABASE TEXT TABLE DEFAULTS ''
|
|
||||||
SET DATABASE SQL NAMES FALSE
|
|
||||||
SET DATABASE SQL RESTRICT EXEC FALSE
|
|
||||||
SET DATABASE SQL REFERENCES FALSE
|
|
||||||
SET DATABASE SQL SIZE TRUE
|
|
||||||
SET DATABASE SQL TYPES FALSE
|
|
||||||
SET DATABASE SQL TDC DELETE TRUE
|
|
||||||
SET DATABASE SQL TDC UPDATE TRUE
|
|
||||||
SET DATABASE SQL SYS INDEX NAMES TRUE
|
|
||||||
SET DATABASE SQL CONCAT NULLS TRUE
|
|
||||||
SET DATABASE SQL UNIQUE NULLS TRUE
|
|
||||||
SET DATABASE SQL CONVERT TRUNCATE TRUE
|
|
||||||
SET DATABASE SQL AVG SCALE 0
|
|
||||||
SET DATABASE SQL DOUBLE NAN TRUE
|
|
||||||
SET FILES WRITE DELAY 500 MILLIS
|
|
||||||
SET FILES BACKUP INCREMENT TRUE
|
|
||||||
SET FILES CACHE SIZE 10000
|
|
||||||
SET FILES CACHE ROWS 50000
|
|
||||||
SET FILES SCALE 32
|
|
||||||
SET FILES LOB SCALE 32
|
|
||||||
SET FILES DEFRAG 0
|
|
||||||
SET FILES NIO TRUE
|
|
||||||
SET FILES NIO SIZE 256
|
|
||||||
SET FILES LOG TRUE
|
|
||||||
SET FILES LOG SIZE 50
|
|
||||||
SET FILES CHECK 458
|
|
||||||
SET DATABASE COLLATION "SQL_TEXT" PAD SPACE
|
|
||||||
CREATE USER SA PASSWORD DIGEST 'd41d8cd98f00b204e9800998ecf8427e'
|
|
||||||
ALTER USER SA SET LOCAL TRUE
|
|
||||||
CREATE SCHEMA PUBLIC AUTHORIZATION DBA
|
|
||||||
ALTER SEQUENCE SYSTEM_LOBS.LOB_ID RESTART WITH 1
|
|
||||||
SET DATABASE DEFAULT INITIAL SCHEMA PUBLIC
|
|
||||||
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CARDINAL_NUMBER TO PUBLIC
|
|
||||||
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.YES_OR_NO TO PUBLIC
|
|
||||||
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.CHARACTER_DATA TO PUBLIC
|
|
||||||
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.SQL_IDENTIFIER TO PUBLIC
|
|
||||||
GRANT USAGE ON DOMAIN INFORMATION_SCHEMA.TIME_STAMP TO PUBLIC
|
|
||||||
GRANT DBA TO SA
|
|
||||||
SET SCHEMA SYSTEM_LOBS
|
|
||||||
INSERT INTO BLOCKS VALUES(0,2147483647,0)
|
|
@ -16,9 +16,7 @@ import org.springframework.web.servlet.view.InternalResourceViewResolver;
|
|||||||
import org.springframework.web.servlet.view.JstlView;
|
import org.springframework.web.servlet.view.JstlView;
|
||||||
|
|
||||||
@EnableWebMvc
|
@EnableWebMvc
|
||||||
@Configuration
|
|
||||||
@EnableTransactionManagement
|
@EnableTransactionManagement
|
||||||
@ComponentScan
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableJpaRepositories("com.wisemapping.model")
|
@EnableJpaRepositories("com.wisemapping.model")
|
||||||
@ImportResource("classpath:spring/wisemapping-common.xml")
|
@ImportResource("classpath:spring/wisemapping-common.xml")
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package com.wisemapping.config;
|
package com.wisemapping.config;
|
||||||
|
|
||||||
|
import jakarta.persistence.EntityManagerFactory;
|
||||||
import org.apache.commons.dbcp2.BasicDataSource;
|
import org.apache.commons.dbcp2.BasicDataSource;
|
||||||
|
import org.hibernate.SessionFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
@ -14,7 +17,6 @@ import java.util.Properties;
|
|||||||
@Configuration
|
@Configuration
|
||||||
@EnableTransactionManagement
|
@EnableTransactionManagement
|
||||||
public class HibernateConfig {
|
public class HibernateConfig {
|
||||||
|
|
||||||
// @Value("${database.hibernate.dialect}")
|
// @Value("${database.hibernate.dialect}")
|
||||||
// private String dbDialect;
|
// private String dbDialect;
|
||||||
//
|
//
|
||||||
|
@ -22,7 +22,6 @@ import com.wisemapping.model.*;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface MindmapManager {
|
public interface MindmapManager {
|
||||||
|
@ -20,6 +20,7 @@ package com.wisemapping.dao;
|
|||||||
|
|
||||||
import com.wisemapping.model.*;
|
import com.wisemapping.model.*;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.persistence.EntityManagerFactory;
|
||||||
import jakarta.persistence.criteria.CriteriaBuilder;
|
import jakarta.persistence.criteria.CriteriaBuilder;
|
||||||
import jakarta.persistence.criteria.CriteriaDelete;
|
import jakarta.persistence.criteria.CriteriaDelete;
|
||||||
import jakarta.persistence.criteria.CriteriaQuery;
|
import jakarta.persistence.criteria.CriteriaQuery;
|
||||||
@ -29,6 +30,7 @@ import org.hibernate.SessionFactory;
|
|||||||
import org.hibernate.query.SelectionQuery;
|
import org.hibernate.query.SelectionQuery;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
@ -37,7 +39,11 @@ import java.util.List;
|
|||||||
@Repository("mindmapManager")
|
@Repository("mindmapManager")
|
||||||
public class MindmapManagerImpl
|
public class MindmapManagerImpl
|
||||||
implements MindmapManager {
|
implements MindmapManager {
|
||||||
@Resource
|
|
||||||
|
@Autowired
|
||||||
|
private EntityManagerFactory entityManagerFactory;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
private SessionFactory sessionFactory;
|
private SessionFactory sessionFactory;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -180,5 +180,6 @@ spring.jpa.open-in-view=true
|
|||||||
spring.h2.console.enabled=true
|
spring.h2.console.enabled=true
|
||||||
spring.h2.console.path=/h2-ui
|
spring.h2.console.path=/h2-ui
|
||||||
|
|
||||||
|
spring.jpa.properties.hibernate.current_session_context_class=org.springframework.orm.hibernate5.SpringSessionContext
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user