Skip to content

Commit

Permalink
upgrade to latest spring and hibernate versions
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli committed Jul 9, 2023
1 parent 8a5db54 commit 2524c7a
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 20 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/spring-javaconfig-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: spring-javaconfig-example

on:
push:
paths:
- "spring-javaconfig-example/**"
branches: [master]
pull_request:
paths:
- "spring-javaconfig-example/**"
types:
- opened
- synchronize
- reopened

jobs:
build:
name: Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: "spring-javaconfig-example"
strategy:
matrix:
distribution: [ 'temurin' ]
java: [ '17' ]
steps:
- uses: actions/checkout@v3

- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: ${{ matrix.distribution }}
cache: 'maven'

- name: Build with Maven
run: ./mvnw clean verify
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

<!-- placeholder pom -->
<modules>
<module>spring-javaconfig-example</module>
<module>spring-xml-example</module>
<module>jndi-embedded-example</module>
<module>jndi-external-example</module>
Expand Down
83 changes: 79 additions & 4 deletions spring-javaconfig-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,84 @@

```
**********************************************************
Name:MyDS, Time:1, Success:True, Type:Statement, Batch:False, QuerySize:1, BatchSize:0, Query:["CREATE TABLE users (id INT, name VARCHAR(20))"], Params:[]
Name:MyDS, Time:0, Success:True, Type:Prepared, Batch:True, QuerySize:1, BatchSize:2, Query:["INSERT INTO users (id, name) VALUES (?, ?)"], Params:[(1=1,2=foo),(1=2,2=bar)]
Name:MyDS, Time:1, Success:True, Type:Prepared, Batch:True, QuerySize:1, BatchSize:2, Query:["INSERT INTO users (id, name) VALUES (?, ?)"], Params:[(1=3,2=FOO),(1=4,2=BAR)]
Name:MyDS, Time:3, Success:True, Type:Statement, Batch:False, QuerySize:1, BatchSize:0, Query:["SELECT COUNT(*) FROM users"], Params:[]
JDBC: ProxyDataSource#getConnection
JDBC: JDBCConnection#createStatement
Name:MyDS, Connection:1, Time:0, Success:True
Type:Statement, Batch:False, QuerySize:1, BatchSize:0
Query:["
CREATE TABLE users (id INT, name VARCHAR(20))"]
Params:[]
Query took 0msec
JDBC: JDBCStatement#execute
JDBC: JDBCStatement#close
JDBC: JDBCConnection#close
JDBC: ProxyDataSource#getConnection
JDBC: JDBCConnection#prepareStatement
JDBC: JDBCPreparedStatement#getConnection
JDBC: JDBCConnection#getMetaData
JDBC: JDBCPreparedStatement#setObject
JDBC: JDBCPreparedStatement#setString
JDBC: JDBCPreparedStatement#addBatch
JDBC: JDBCPreparedStatement#setObject
JDBC: JDBCPreparedStatement#setString
JDBC: JDBCPreparedStatement#addBatch
Name:MyDS, Connection:2, Time:0, Success:True
Type:Prepared, Batch:True, QuerySize:1, BatchSize:2
Query:["
INSERT
INTO
users
(id, name)
VALUES
(?, ?)"]
Params:[(1,foo),(2,bar)]
Query took 0msec
JDBC: JDBCPreparedStatement#executeBatch
JDBC: JDBCPreparedStatement#close
JDBC: JDBCConnection#close
JDBC: ProxyDataSource#getConnection
JDBC: JDBCConnection#prepareStatement
JDBC: JDBCPreparedStatement#setString
JDBC: JDBCPreparedStatement#setInt
JDBC: JDBCPreparedStatement#addBatch
JDBC: JDBCPreparedStatement#setInt
JDBC: JDBCPreparedStatement#setString
JDBC: JDBCPreparedStatement#addBatch
Name:MyDS, Connection:3, Time:0, Success:True
Type:Prepared, Batch:True, QuerySize:1, BatchSize:2
Query:["
INSERT
INTO
users
(id, name)
VALUES
(?, ?)"]
Params:[(3,FOO),(4,BAR)]
Query took 0msec
JDBC: JDBCPreparedStatement#executeBatch
JDBC: ProxyDataSource#getConnection
JDBC: JDBCConnection#createStatement
Name:MyDS, Connection:4, Time:2, Success:True
Type:Statement, Batch:False, QuerySize:1, BatchSize:0
Query:["
SELECT
COUNT(*)
FROM
users"]
Params:[]
Query took 2msec
JDBC: JDBCStatement#executeQuery
JDBC: JDBCResultSet#next
JDBC: JDBCResultSet#getMetaData
JDBC: JDBCResultSet#getInt
JDBC: JDBCResultSet#wasNull
JDBC: JDBCResultSet#next
JDBC: JDBCResultSet#close
JDBC: JDBCStatement#close
JDBC: JDBCConnection#close
**********************************************************
```
20 changes: 5 additions & 15 deletions spring-javaconfig-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<modelVersion>4.0.0</modelVersion>
<groupId>net.ttddyy</groupId>
<artifactId>dsp-spring-javaconfig-example</artifactId>
<version>1.0-SNAPSHOT</version>

Expand All @@ -14,32 +15,21 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
<version>3.1.1</version>
<relativePath/>
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<datasource-proxy.version>1.4.7</datasource-proxy.version>
<java.version>17</java.version>
<datasource-proxy.version>1.8.1</datasource-proxy.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<jvmArguments>--add-opens java.base/java.lang=ALL-UNNAMED</jvmArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
</build>
Expand All @@ -51,7 +41,7 @@
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-core</artifactId>
</dependency>

Expand Down

0 comments on commit 2524c7a

Please sign in to comment.