Skip to content

Commit

Permalink
解决jdk11以上javax.annotation.Resource不存在
Browse files Browse the repository at this point in the history
  • Loading branch information
fartherp committed Jan 13, 2020
1 parent bf680b3 commit 0bf90b2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/
package com.github.fartherp.dbtest.spring;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;

import javax.annotation.Resource;
import javax.sql.DataSource;

/**
Expand All @@ -35,7 +35,7 @@ protected DataSource getDataSource() {
return dataSource;
}

@Resource(name = "dataSource")
@Autowired
public void setDataSource(DataSource dataSource) {
this.dataSource = dataSource;
}
Expand Down

0 comments on commit 0bf90b2

Please sign in to comment.