Skip to content

Commit

Permalink
Replace AuthorityRepository with r2dbc generic repository
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Feb 5, 2025
1 parent f01d519 commit 44b603c
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 74 deletions.
3 changes: 3 additions & 0 deletions generators/spring-boot-v2/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ export default class extends BaseApplicationGenerator {
if (application.user && destinationFile.endsWith('UserCallback.java')) {
return undefined;
}
if (application.generateBuiltInAuthorityEntity && destinationFile.endsWith('AuthorityRepository.java')) {
return undefined;
}

if (
sourceFile.endsWith('/TestContainersSpringContextCustomizerFactory.java') &&
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<%#
Copyright 2013-2024 the original author or authors from the JHipster project.
This file is part of the JHipster project, see https://www.jhipster.tech/
for more information.
Licensed under the Apache License, Version 2.0 (the "License")
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-%>
package <%= entityAbsolutePackage %>.repository

import <%= entityAbsolutePackage %>.domain.<%= persistClass %>

import org.springframework.data.r2dbc.repository.R2dbcRepository
import org.springframework.stereotype.Repository
<%_ if (primaryKey.typeUUID) { _%>
import java.util.UUID
<%_ } _%>

/**
* <%= springDataDescription %> repository for the [<%= persistClass %>] entity.
*/
@Repository
interface <%= entityClass %>Repository : R2dbcRepository<<%= persistClass %>, <%= primaryKey.type %>>
3 changes: 0 additions & 3 deletions test/__snapshots__/app.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2469,9 +2469,6 @@ exports[`JHipster generator for App generator > Application with other options >
"src/main/kotlin/com/test/reactui/domain/User.kt": {
"stateCleared": "modified",
},
"src/main/kotlin/com/test/reactui/repository/AuthorityRepository.kt": {
"stateCleared": "modified",
},
"src/main/kotlin/com/test/reactui/security/AuthoritiesConstants.kt": {
"stateCleared": "modified",
},
Expand Down

0 comments on commit 44b603c

Please sign in to comment.