Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Smellswisdom
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ginquin
Smellswisdom
Commits
fdbb6154
Commit
fdbb6154
authored
Mar 20, 2019
by
ginquin
Browse files
Options
Downloads
Patches
Plain Diff
Arreglado conexion con postgreSQL
parent
1e3a9121
Branches
Branches containing commit
No related tags found
1 merge request
!1
Rama postgres
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pom.xml
+3
-8
3 additions, 8 deletions
pom.xml
src/main/webapp/WEB-INF/applicationContext.xml
+9
-3
9 additions, 3 deletions
src/main/webapp/WEB-INF/applicationContext.xml
with
12 additions
and
11 deletions
pom.xml
+
3
−
8
View file @
fdbb6154
...
...
@@ -104,12 +104,7 @@
<dependency>
<groupId>
org.postgresql
</groupId>
<artifactId>
postgresql
</artifactId>
<version>
42.2.5
</version>
</dependency>
<dependency>
<groupId>
commons-dbcp
</groupId>
<artifactId>
commons-dbcp
</artifactId>
<version>
1.4
</version>
<version>
9.4-1201-jdbc4
</version>
</dependency>
<!-- extra -->
...
...
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/applicationContext.xml
+
9
−
3
View file @
fdbb6154
...
...
@@ -24,16 +24,22 @@
<constructor-arg
value=
"#{systemEnvironment['DATABASE_URL']}"
/>
</bean>
<bean
id=
"dataSource"
class=
"org.apache.commons.dbcp.BasicDataSource"
>
<bean
id=
"dataSource"
class=
"org.springframework.jdbc.datasource.DriverManagerDataSource"
>
<property
name=
"driverClassName"
>
<value>
org.postgresql.Driver
</value>
</property>
<property
name=
"url"
value=
"#{ 'jdbc:postgresql://' + @dbUrl.getHost() + ':' + @dbUrl.getPort() + @dbUrl.getPath() }"
/>
<property
name=
"username"
value=
"#{ @dbUrl.getUserInfo().split(':')[0] }"
/>
<property
name=
"password"
value=
"#{ @dbUrl.getUserInfo().split(':')[1] }"
/>
</bean>
<bean
id=
"entityManagerFactory"
class=
"org.springframework.orm.jpa.LocalEntityManagerFactoryBean"
>
class=
"org.springframework.orm.jpa.Local
Container
EntityManagerFactoryBean"
>
<property
name=
"dataSource"
ref=
"dataSource"
/>
<property
name=
"persistenceUnitName"
value=
"jpaData"
/>
<property
name=
"jpaVendorAdapter"
>
<bean
class=
"org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"
/>
</property>
</bean>
<bean
id=
"transactionManager"
...
...
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