Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
e2fdbb4a
Commit
e2fdbb4a
authored
6 years ago
by
Sascha Herzinger
Browse files
Options
Downloads
Patches
Plain Diff
Reverting to C3P0 for now because of logging issues
parent
6f4b0c54
No related branches found
No related tags found
2 merge requests
!630
WIP: Resolve "The privileges of a new user are not saved in some cases"
,
!499
Spring config update
Pipeline
#7327
failed
6 years ago
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
persist/pom.xml
+9
-4
9 additions, 4 deletions
persist/pom.xml
persist/src/main/java/lcsb/mapviewer/persist/SpringPersistConfig.java
+23
-8
23 additions, 8 deletions
...main/java/lcsb/mapviewer/persist/SpringPersistConfig.java
pom.xml
+1
-0
1 addition, 0 deletions
pom.xml
with
33 additions
and
12 deletions
persist/pom.xml
+
9
−
4
View file @
e2fdbb4a
...
...
@@ -147,10 +147,15 @@
<version>
${postgresql-jdbc.version}
</version>
</dependency>
<dependency>
<groupId>
com.zaxxer
</groupId>
<artifactId>
HikariCP
</artifactId>
<version>
${hikari.version}
</version>
<!--<dependency>-->
<!--<groupId>com.zaxxer</groupId>-->
<!--<artifactId>HikariCP</artifactId>-->
<!--<version>${hikari.version}</version>-->
<!--</dependency>-->
<dependency>
<groupId>
c3p0
</groupId>
<artifactId>
c3p0
</artifactId>
<version>
${c3p0.version}
</version>
</dependency>
<dependency>
...
...
This diff is collapsed.
Click to expand it.
persist/src/main/java/lcsb/mapviewer/persist/SpringPersistConfig.java
+
23
−
8
View file @
e2fdbb4a
package
lcsb.mapviewer.persist
;
import
com.
zaxxer.hikari.Hikari
DataSource
;
import
com.
mchange.v2.c3p0.ComboPooled
DataSource
;
import
org.hibernate.SessionFactory
;
import
org.hibernate.cfg.Environment
;
import
org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy
;
...
...
@@ -15,6 +15,7 @@ import org.springframework.security.authentication.encoding.Md5PasswordEncoder;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
javax.sql.DataSource
;
import
java.beans.PropertyVetoException
;
import
java.util.Properties
;
@Configuration
...
...
@@ -27,15 +28,29 @@ public class SpringPersistConfig {
return
new
ConfigurationHolder
();
}
@Bean
public
HikariDataSource
dataSource
(
ConfigurationHolder
config
)
{
HikariDataSource
dataSource
=
new
HikariDataSource
();
dataSource
.
setDriverClassName
(
"org.postgresql.Driver"
);
// @Bean
// public HikariDataSource dataSource(ConfigurationHolder config) {
// HikariDataSource dataSource = new HikariDataSource();
// dataSource.setDriverClassName("org.postgresql.Driver");
// dataSource.setJdbcUrl(config.getDbUri());
// dataSource.setUsername(config.getDbUsername());
// dataSource.setPassword(config.getDbPassword());
// dataSource.setIdleTimeout(30000);
// dataSource.setMaximumPoolSize(90);
// dataSource.setConnectionTestQuery("select 1");
// return dataSource;
// }
@Bean
(
destroyMethod
=
"close"
)
public
ComboPooledDataSource
dataSource
(
ConfigurationHolder
config
)
throws
PropertyVetoException
{
ComboPooledDataSource
dataSource
=
new
ComboPooledDataSource
();
dataSource
.
setDriverClass
(
"org.postgresql.Driver"
);
dataSource
.
setJdbcUrl
(
config
.
getDbUri
());
dataSource
.
setUser
name
(
config
.
getDbUsername
());
dataSource
.
setUser
(
config
.
getDbUsername
());
dataSource
.
setPassword
(
config
.
getDbPassword
());
dataSource
.
setIdleTimeout
(
30000
);
dataSource
.
setMaximumPoolSize
(
90
);
dataSource
.
setMinPoolSize
(
5
);
dataSource
.
setMaxPoolSize
(
90
);
dataSource
.
setMaxStatements
(
5
);
return
dataSource
;
}
...
...
This diff is collapsed.
Click to expand it.
pom.xml
+
1
−
0
View file @
e2fdbb4a
...
...
@@ -65,6 +65,7 @@
<postgresql-jdbc.version>
42.2.5
</postgresql-jdbc.version>
<hikari.version>
3.2.0
</hikari.version>
<c3p0.version>
0.9.1.2
</c3p0.version>
<cglib.version>
3.2.8
</cglib.version>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment