jhipster

Spring Security, How do I grab the attempted username trying to log in?

限于喜欢 提交于 2019-12-02 16:53:36
问题 I have this class: public class CustomPasswordEncoder implements PasswordEncoder { @Autowired private JdbcTemplate jdbcTemplate; @Inject private PasswordEncoder passwordEncoder; public String encode(CharSequence rawPassword) { String hashedPass; String userLogin; String encryptedPassword; sql = "select PasswordHash('?','?') from dual"; hashedPass = (String)getJdbcTemplate().queryForObject( sql, new Object[] { userLogin,rawPassword }, String.class); encryptedPassword = passwordEncoder.encode

Separate Client and Server in Jhipster Gateway

穿精又带淫゛_ 提交于 2019-12-02 13:16:54
问题 I am implementing Microservice but want to separate Client from Jhipster Gateway so that can have modular model. Can someone let me know how to separate client and server in Jhipster Gateway? 回答1: Just use the follow command: jhispter --skip-server to create gateway service without frontend. jhispter --skip-client --auth --db to create gateway frontend withou service. but I don't know how set the parameter "--auth" "--db" yet. I just merge the code generated by jhispter to the frontend code.

Jhipster4, Angular2: How include static image in html

末鹿安然 提交于 2019-12-02 11:45:38
Could you help me with including static image in html template. I generated project using jhipster generator (chosen Angular 2) and now I'm trying to include static image in html-template of component (for example for NavbarComponent into navbar.component.html ). I inserted tag image into navbar.component.html <img src="url" /> My image is placed into webapp/content/images/staticimage.jpg (this folder containts logo-hipster.png also). What do I have to place instead of url in img tag to see my image? P.S. the inital structure of generated project wasn't changed. This issue was related to

How to generate jhipster application into a different directory?

我只是一个虾纸丫 提交于 2019-12-02 10:10:28
When I run the following in jhipster-generator's /cli directory: cd cli node jhipster.js I'm generating the application in the same directory (cli). How would I change this directory to somewhere else? For example, export all the generated files into a specific directory. I believe the directory has something to do with this line of code in jhipster.js: const localCLI = require.resolve(path.join(process.cwd(), 'node_modules', 'generator-jhipster', 'cli', 'cli.js')); Note: I'm not running the application with "jhipster" command. 来源: https://stackoverflow.com/questions/56960459/how-to-generate

Spring Security, How do I grab the attempted username trying to log in?

旧巷老猫 提交于 2019-12-02 09:55:14
I have this class: public class CustomPasswordEncoder implements PasswordEncoder { @Autowired private JdbcTemplate jdbcTemplate; @Inject private PasswordEncoder passwordEncoder; public String encode(CharSequence rawPassword) { String hashedPass; String userLogin; String encryptedPassword; sql = "select PasswordHash('?','?') from dual"; hashedPass = (String)getJdbcTemplate().queryForObject( sql, new Object[] { userLogin,rawPassword }, String.class); encryptedPassword = passwordEncoder.encode(hashedPass); return encryptedPassword; } } What I need to do is get the USERNAME from the form and have

JHipster JDL not generating anything because the database type must be passed

风格不统一 提交于 2019-12-02 08:31:26
I'm using Jhipster 4.5.3 to generate some code from a JDL file I've created. Because I couldn't generate anything, I took the JDL Blog sample ... and I have the same issues. The JDL documentation still mentions : You can generate entities from a JDL file by running jhipster import-jdl your-jdl-file.jh But when I do that I get : The jdl is being parsed. { name: 'NullPointerException', message: 'The parsed JDL content and the database type must be passed.', Looking at the code , it looks like we have to pass a new parameter, the database type (this is not mentioned in the doc BTW). Looking at

yeoman creates project in Desktop even though I CD into directory

拥有回忆 提交于 2019-12-02 08:28:24
I am having a issue creating a yeoman project. I cd in the directory type yo and it says: Here is it suppose to asked me project name etc and it wants to throw everything on my desktop not the file I cd into. It defaults to mvn and I want gradle. I even npm uninstall -g generator-jhipster and reinstalled it and got the same issue. If you have a .yo-rc.json file in a parent directory, Yeoman will load that configuration and generate from that file instead of prompting. This allows developers to run a yo command from any folder in the project and have it apply to the correct files. To solve this

Remove items from array of documents in Spring+Mongo

♀尐吖头ヾ 提交于 2019-12-02 07:27:21
I have a collection of documents like this in a mongo db : "_id" : ObjectId("592bc37c339e7a23788b4c7c"), "trips" : [ { "tripGcsId" : "5937f86e339e7a2a58ac3186", "tripCounter" : NumberLong(1283), "tripRef" : "hjkhjk" }, { "tripGcsId" : "5937f914339e7a2a58ac318b", "tripCounter" : NumberLong(1284), "tripRef" : "fjh" } ] and a method on the server side (Spring+Mongo): public List<String> removeTripObject( List<String> tripIds ) { Query query = Query.query( Criteria.where( "trips" ).elemMatch( Criteria.where( "tripGcsId" ).in( tripIds ) ) ); Update update = new Update().pullAll( "trips.tripGcsId",

How to add context file from Wildfly to JHipster

淺唱寂寞╮ 提交于 2019-12-02 06:42:32
问题 The context root file from Wildfly AS looks like this (it must be put in a file name jboss-web.xml as explained here : <?xml version="1.0" encoding="UTF-8"?> <jboss-web> <context-root>my-context</context-root> </jboss-web> This file and its content have to be copied into the WEB-INF folder of the WAR file. Of course I can manually add this file after the build and it works. But is there a way to do it automatically ? Is there in JHipster any folder that copies its content to the WEB-INF

*** process.env.ENV is not defined, assuming 'prod' env

為{幸葍}努か 提交于 2019-12-02 05:20:12
问题 I am unable to open My JHipster + Angular 2 (Gateway) Application home page with port 8080 (which is given at server port in application-dev.yml ) and Getting following exception in console *** process.env.ENV is not defined, assuming 'prod' env The Same application is running fine on port 9000 (which is given by yarn) and giving exception like below in console. process.env.ENV is not defined, assuming 'prod' env chrome-extension://kbfnbcaeplbcioakkpcpgfkobkghlhen/src/js/bundle.js:4776 *** My