-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Gorm Data service,def dataSource not injected
replace usage of def dataSource
- Loading branch information
Showing
2 changed files
with
39 additions
and
21 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
integration-test-app/grails-app/services/test/TestPersistentLoginService.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package test | ||
|
||
import grails.gorm.services.Service | ||
import grails.gorm.transactions.ReadOnly | ||
|
||
interface ITestPersistentLoginService { | ||
|
||
List<TestPersistentLogin> findAll(Map args) | ||
|
||
TestPersistentLogin save(String series, String token, String username, Date lastUsed) | ||
|
||
Number countByUsername(String username) | ||
} | ||
|
||
@Service(TestPersistentLogin) | ||
abstract class TestPersistentLoginService implements ITestPersistentLoginService { | ||
|
||
@ReadOnly | ||
TestPersistentLogin get(String series) { | ||
TestPersistentLogin.get(series) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters