草庐IT

JHipster

全部标签

java - Spring Security 在休息服务中获取用户信息,用于经过身份验证和未经过身份验证的用户

我有一个springrest服务,我想将它用于经过身份验证和未经过身份验证的用户。如果用户通过身份验证,我想从SecurityContextHolder.getContext().getAuthentication()获取用户信息。如果我使用.antMatchers("/app/rest/question/useroperation/list/**").permitAll()在ouath2配置中,如下所示,然后我可以获得用户信息经过身份验证的用户,但未经过身份验证的用户出现401错误。如果我.antMatchers("/app/rest/question/useroperation/l

Spring Security 使用 HttpSecurity 授权对 url 和方法的请求

有没有办法使用org.springframework.security.config.annotation.web.builders.HttpSecurity授权对特定url的发布请求?我正在使用HttpSecurity作为:@Overrideprotectedvoidconfigure(HttpSecurityhttp)throwsException{http.addFilterAfter(newCsrfCookieGeneratorFilter(),CsrfFilter.class).exceptionHandling().authenticationEntryPoint(auth

Spring Security 使用 HttpSecurity 授权对 url 和方法的请求

有没有办法使用org.springframework.security.config.annotation.web.builders.HttpSecurity授权对特定url的发布请求?我正在使用HttpSecurity作为:@Overrideprotectedvoidconfigure(HttpSecurityhttp)throwsException{http.addFilterAfter(newCsrfCookieGeneratorFilter(),CsrfFilter.class).exceptionHandling().authenticationEntryPoint(auth

java - 将 Redis 集成到 JHipster CacheConfiguration 错误

在Github上的这个拉取请求之后,我正在尝试将redis缓存集成到JHipster生成器:https://github.com/jhipster/generator-jhipster/pull/10057/commits/cd2f2865d35dfd77624dd3a38ed32822e895539d#我在构建项目时收到此错误:[ERROR]symbol:methodgetRedis()[ERROR]location:classio.github.jhipster.config.JHipsterProperties.Cache[ERROR]../config/CacheConfigu

java - JHipster Redis 集成元素未绑定(bind)错误

所以我一直在关注这个将redis集成到jhipster生成器上的拉取请求:https://github.com/jhipster/generator-jhipster/pull/10057/commits/cd2f2865d35dfd77624dd3a38ed32822e895539d这是我配置的:应用程序属性.java:packagecom.xxx.xxx.config;importorg.springframework.boot.context.properties.ConfigurationProperties;importio.github.jhipster.config.JH

mongodb - 添加新角色 JHipster 和 MongoDb

我正在使用JHipster和MongoDb创建应用程序,并且正在尝试添加新角色。我向security/AuthoritiesConstants添加了新常量,但在我的集合jhi_authorities中我没有看到变化。有人知道如何将我的新角色添加到这个集合吗? 最佳答案 您还必须将新权限添加到MongoDb,请参阅InitialSetupMigration.java,在此处添加它们或创建新的迁移。参见doc 关于mongodb-添加新角色JHipster和MongoDb,我们在StackO

java - Jhipster - MySQL java.sql.SQLException : Access denied for user 'root' @'localhost' (using password: NO) 错误

我正在尝试通过JHipster创建一个项目并将其部署到Openshif。一切看起来都很正常,但是当运行mvnspring-boot:run或从IDE运行时,没有与MySQL数据库的连接。错误是:Exceptioninthread"main"org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration':BeanPostProces

java - 将jhipster后端和前端分离成两个项目?

我正在尝试jhipster使用基于token的身份验证。效果很好。现在,我想在不同域上运行后端和前端代码。我该怎么做?这是我尝试过的:运行yojhipster并选择基于token的身份验证选项:WelcometotheJHipsterGenerator?(1/13)Whatisthebasenameofyourapplication?jhipster?(2/13)WhatisyourdefaultJavapackagename?com.mycompany.myapp?(3/13)DoyouwanttouseJava8?Yes(useJava8)?(4/13)Which*type*ofa

java - JHipster 应用程序中的 Redis 集成

我想在我的JHipser应用程序中包含Redis,所以我在pom中添加了这两个依赖项:org.springframework.dataspring-data-redis1.4.2.RELEASEredis.clientsjedis2.0.0jar但是当我在Maven中进行清理/安装时,我在MetricsConfiguration.java中遇到大量错误,原因是:java.lang.IllegalArgumentException:名为jvm.memory.pools.Code-Cache.usage的指标已经存在编辑我想放置完整的堆栈跟踪,但它太大了,所以我添加了essencially

java - 如何修改使用 jhipster 生成的现有实体?

我使用jhipster生成器来创建一个项目。我根据jhipsterdocumentation中提供的信息手动生成了一些实体。:Ifyouprefer(orneed)todoadatabaseupdatemanually,hereisthedevelopmentworkflow:ModifyyourJPAentity(addafield,arelationship,etc.)Createanew"changelog"inyoursrc/main/resources/config/liquibase/changelogdirectory.Thefilesinthatdirectoryare