Hipster stack for Java developers. Spring Boot + Angular in one handy generator.
@kaffelmedhoussem:matrix.org i remember i did some thing similar in the past and it worked perfectly this is an example, i hope will help you : login(): void {
this.loginService
.login({
username: this.loginForm.get('username')!.value,
password: this.loginForm.get('password')!.value,
rememberMe: this.loginForm.get('rememberMe')!.value,
})
.subscribe(
() => {
this.authenticationError = false;
this.activeModal.close();
if (
this.router.url === '/account/register' ||
this.router.url.startsWith('/account/activate') ||
this.router.url.startsWith('/account/reset/')
) {
this.router.navigate(['/leads']);
}
},
() => (this.authenticationError = true)
);
// get user account
this.authSubscription = this.accountService.getAuthenticationState().subscribe(account => {
this.account = account;
if (this.account) {
this.userRole = this.account.authorities[0];
if(this.userRole === 'ROLE_ADMIN'){
this.router.navigate(['your-route']);
}
}
});
}
[error] Error: Cannot find module 'webpack-dev-server'
Require stack:
- C:\project-root\node_modules\@angular-devkit\build-webpack\src\webpack-dev-server\index.js
- C:\project-root\node_modules\@angular-devkit\build-webpack\src\index.js
- C:\project-root\node_modules\@angular-devkit\build-angular\src\browser\index.js
- C:\project-root\node_modules\@angular-devkit\build-angular\src\index.js
- C:\project-root\node_modules\@angular-builders\custom-webpack\dist\browser\index.js
- C:\project-root\node_modules\@angular\cli\node_modules\@angular-devkit\architect\node\node-modules-architect-host.js
- C:\project-root\node_modules\@angular\cli\node_modules\@angular-devkit\architect\node\index.js
- C:\project-root\node_modules\@angular\cli\models\architect-command.js
- C:\project-root\node_modules\@angular\cli\commands\build-impl.js
- C:\project-root\node_modules\@angular-devkit\schematics\tools\export-ref.js
- C:\project-root\node_modules\@angular-devkit\schematics\tools\index.js
- C:\project-root\node_modules\@angular\cli\utilities\json-schema.js
- C:\project-root\node_modules\@angular\cli\models\command-runner.js
- C:\project-root\node_modules\@angular\cli\lib\cli\index.js
- C:\project-root\node_modules\@angular\cli\lib\init.js
- C:\project-root\node_modules\@angular\cli\bin\ng
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
webpack-dev-server
was a devDependency in 6.10.1, but seems not to be anymore with 7.0.1
I saw that in JHipster 7.0.0 support for UAA was dropped in jhipster/generator-jhipster#13081
What does that mean exactly for users having a UAA server ? We are stuck on JHipster 6 ?
We should migrate to Keycloak ?
Hi everyone Great project really
i'm using jhipster 7.0.1 i tried to run the example on this site Full-Stack-Development-with-JHipster-Second-Edition i was able to generate everything but when i tried to run it using docker compose many errors happens first
When trying to generate docker image for the gatway(store) using ./gradlew bootJar -Pprod jibDockerBuild compile fail with error
> Task :compileJava
Note: Hibernate JPA 2 Static-Metamodel Generator 5.4.29.Final
/mnt/04A61646A616391E/dev/studing/programming/java/spring/Full-Stack-Development-with-JHipster/chapter09/store/src/main/java/com/mycompany/store/security/jwt/JWTFilter.java:43: error: cannot find symbol
String jwt = request.getParameter(AUTHORIZATION_TOKEN);
^
symbol: method getParameter(String)
location: variable request of type ServerHttpRequest
Note: /mnt/04A61646A616391E/dev/studing/programming/java/spring/Full-Stack-Development-with-JHipster/chapter09/store/src/main/java/com/mycompany/store/security/jwt/JWTFilter.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /mnt/04A61646A616391E/dev/studing/programming/java/spring/Full-Stack-Development-with-JHipster/chapter09/store/src/main/java/com/mycompany/store/security/jwt/TokenProvider.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
I guess the problem here in file store/src/main/java/com/mycompany/store/security/jwt/JWTFilter.java
private String resolveToken(ServerHttpRequest request) {
String bearerToken = request.getHeaders().getFirst(AUTHORIZATION_HEADER);
if (StringUtils.hasText(bearerToken) && bearerToken.startsWith("Bearer ")) {
return bearerToken.substring(7);
}
String jwt = request.getParameter(AUTHORIZATION_TOKEN);
if (StringUtils.hasText(jwt)) {
return jwt;
}
return null;
}
ServerHttpRequest dosent have getParameter method
<!-- jhipster-needle-maven-add-dependency-management -->
hi everyone, i generated a jhipster project with Vuejs and i integrated and installed PRIMEVUE, but inject component lib's prime is error and not working
source:
import { mixins } from 'vue-class-component';
import { Component, Vue, Inject } from 'vue-property-decorator';
import Vue2Filters from 'vue2-filters';
import { IDmCqbh } from '@/shared/model/dm-cqbh.model';
import DmCqbhService from './dm-cqbh.service';
import InputText from 'primevue/inputtext';
@Component({
mixins: [Vue2Filters.mixin],
InputText: InputText,
})
export default class DmCqbh extends Vue {
@Inject('dmCqbhService') private dmCqbhService: () => DmCqbhService;
}
vendor.scss:
@import '~primevue/resources/themes/saga-blue/theme'; //theme
@import '~primevue/resources/primevue.min'; //core css
@import '~primeicons/primeicons'; //icons
help appreciated!