Quantcast
Channel: User Bastien Jansen - Stack Overflow
Browsing latest articles
Browse All 39 View Live

Comment by Bastien Jansen on Use Spring options tag to display enum's...

This used to work in 3.0, but has been broken since 3.1, see jira.spring.io/browse/SPR-9214 and jira.spring.io/browse/SPR-10281

View Article



Comment by Bastien Jansen on Writing an if statement in Ceylon

I edited my comment, you need to put the if in a function.

View Article

Comment by Bastien Jansen on Is there a way to clone an IntelliJ IDEA gradle...

Have you tried re-importing the (IntelliJ) project from the build.gradle file?

View Article

Comment by Bastien Jansen on Enable JMX with spring boot repackage

This is because you are running a jar: everything after -jar my.jar is passed as arguments to your main method (String[] args), not as JVM options.

View Article

Comment by Bastien Jansen on How can I use ngFor to iterate over Typescript...

In fact in Angular 6 you don't even need the pipe anymore, just use role = Object.keys(Role) in your component.

View Article


Comment by Bastien Jansen on Can the macOS Git client use certificates stored...

Unfortunately this doesn't work anymore, because the --with-curl option was removed recently, see github.com/Homebrew/homebrew-core/commit/…

View Article

Comment by Bastien Jansen on Visually identify name of field in PDF form

Well when you open the output PDF, every text field is filled with its name, so just by looking at a field you can see (and copy) its name.

View Article

Comment by Bastien Jansen on Reuse agent (docker container) in Jenkins...

Exactly what I was looking for. Works perfectly in a declarative pipeline, thanks!

View Article


Comment by Bastien Jansen on Spring boot autowiring properties question

It's enough to make Spring manage its own instance, but in your example you are creating a separate instance yourself, and this one will not be managed by Spring. If you want Spring to create an...

View Article


Comment by Bastien Jansen on How to bind Java object to HTML form using...

Have you tried <input type="text" id="emailAddress" name="emailAddress" value="{{userDetailsForm.emailAddress}}">?

View Article

Comment by Bastien Jansen on Change intellij JVM

See the link in my answer: "The path to the selected runtime is stored in the idea.jdk or idea64.jdk file in the IntelliJ IDEA configuration directory. If there are problems with the selected runtime,...

View Article

Comment by Bastien Jansen on Can I do remote debug of two different projects...

You're right, I updated my answer to suggest another approach: import modules from different projects in the same IntelliJ project to mimic Eclipse workspaces.

View Article

Comment by Bastien Jansen on Migrating Hibernate mixed inheritance from...

From what I understand, persisting a SpecialOutFile would still create a record in the generic file table though, to store properties defined in parent classes?

View Article


Comment by Bastien Jansen on How can I pass a string containing spaces from...

The quotes in the sh command are probably closed by the quotes in $opts. Perhaps you could treat opts as multiple arguments instead of a single string argument, remove the quotes in your sh command and...

View Article

Image may be NSFW.
Clik here to view.

Answer by Bastien Jansen for Extending code completion to support internal orm

CompletionContributor is the way to go. This example is taken from the official SDK docs:public class SimpleCompletionContributor extends CompletionContributor { public SimpleCompletionContributor() {...

View Article


Answer by Bastien Jansen for Finding classes/files/symbols with umlauts (ä,...

You could provide your own instance of com.intellij.navigation.GotoClassContributor and in getItemsByName() look for the different variants of the input name in the PSI class index.For example, if you...

View Article

Answer by Bastien Jansen for Is it possible to call the main method passing...

Have you tried something like :// In your methodString[] yourArgs = new String[] {"foo", "baz", "bar"};YourClassWithMain.main(yourArgs);But I think this is not a good idea, the main() method should...

View Article


Answer by Bastien Jansen for What's this highlighting in IntelliJ known as?

I believe it's an injected language fragment (in Preferences > Editor > Colors & Fonts > General, then Code > Injected language fragment).The language being injected is AspectJ.

View Article

Image may be NSFW.
Clik here to view.

Answer by Bastien Jansen for Compiling code from within IntelliJ

Agreed, the documentation lacks a "Getting started with IntelliJ" section, I'm going to fix that this week.Here are the steps needed to run a simple project in IntelliJ.Create a new project via File...

View Article

Image may be NSFW.
Clik here to view.

Answer by Bastien Jansen for ceylon run: Module default/unversioned not found

The screenshot you provided shows that the run configuration isn't based on any IntelliJ module (Use classpath of module is set to [none]). This means that the configuration will not be run in your...

View Article

Answer by Bastien Jansen for Escaping module names with hyphen ceylon module...

You can use quotes. Specifying the explicit maven: namespace is also recommended:import maven:"com.fasterxml.jackson.core:jackson-core""2.8.4";See section 9.3.10. “Module descriptors” of the Ceylon...

View Article


Answer by Bastien Jansen for wso2esb remove context path from uri

Try removing the REST_URL_POSTFIX property:<property name="REST_URL_POSTFIX" action="remove" scope="axis2"/>From the docs:The value of this property will be appended to the target URL when...

View Article


Answer by Bastien Jansen for Validating JSON against Swagger API schema

Atlassian's swagger-request-validator is a Java library that can do such validation:A Java library for validating request/responses against a OpenAPI / Swagger specification. Includes support for...

View Article

Answer by Bastien Jansen for Why can't I prevent Apache POI from altering the...

I had the same problem and solved it by using a FileInputStream instead of a File.Workbook workbook = WorkbookFactory.create(file);becomes:Workbook workbook = WorkbookFactory.create(new...

View Article

Answer by Bastien Jansen for StringTemplates, how to create a group of...

You can use STGroup.defineTemplate(), even if its Javadoc says for testing:STGroup stGroup = new STGroup();stGroup.defineTemplate("myTemplate", "is this true? <if (true)>yes<endif>");//...

View Article


Answer by Bastien Jansen for SXSSF with Excel table

Here's an updated version that fixes several usages of deprecated methods (tested with POI 4.1.2). Note that it doesn't require creating columns and settings IDs manually anymore, everything is done by...

View Article

Answer by Bastien Jansen for How to inject prefixed properties into...

You can define a new bean that is annotated with @ConfigurationProperties, like this:@Bean@ConfigurationProperties(prefix = "kafka")public Properties kafkaProperties() { return new...

View Article

Answer by Bastien Jansen for Properly import...

Java-related classes were extracted in a dedicated plugin in SDK 2019.2:https://blog.jetbrains.com/platform/2019/06/java-functionality-extracted-as-a-plugin/You're targeting SDK 2020.2.3, which means...

View Article

Answer by Bastien Jansen for PsiClass to java.lang.Class

IntelliJ does mostly static analysis on your code. In fact, the IDE and the projects you run/debug have completely different classpaths. When you open a project, your dependencies are not added to the...

View Article



Answer by Bastien Jansen for Intellij how to set gradle property -Pname=value

In your run configuration, you can add -PuseNewLibs=true to the Program arguments: section.

View Article

Image may be NSFW.
Clik here to view.

Answer by Bastien Jansen for How to pass command-line arguments to IntelliJ...

How do I know the version of the JVM being used by IntelliJ?You can find that in the 'about' dialog:Can I point IntelliJ towards another JVM for its own operations, for a later version of 17...

View Article

Answer by Bastien Jansen for How do I check if variable is an array?

According to this wiki page, you can use this command:declare -p variable-name 2> /dev/null | grep -q '^declare \-a'

View Article

Answer by Bastien Jansen for InetAddress.getLocalHost().getHostName()...

This might be the same problem as reported here: InetAddress.getLocalhost() does not give same result in java7 and java8.It boils down to a change in the JDK:Since:...

View Article


Answer by Bastien Jansen for How to optimize the Hibernate execution time?

This means that a lot of time is spent running SQL queries, which is often the case on a typical CRUD application.Query.getResultList() relates to select queries, and SessionImpl.executeUpdate()...

View Article

Answer by Bastien Jansen for How to do a left outer join using criteria query...

If Phone is an entity managed by JPA but not A and B, you could use a native query instead of the Criteria API. This way you can take the SQL query from your old code as-is and use it with JPA.String...

View Article

Answer by Bastien Jansen for Does BeanIO require I provide a setter

If your beans are only meant to be serialized (i.e. used by a BeanWriter), you can declare your stream as mode="write". This will cause BeanIO to look for getters but not setters.The reference guide...

View Article


Answer by Bastien Jansen for Regex - match all strings with specific exceptions

You can use a negative lookahead:^(?!foo_baz).*$See https://regex101.com/r/jBCSjR/1Or, depending on your programming language, it could be easier to filter out values using startsWith() or any equivalent.

View Article


Answer by Bastien Jansen for reference to onLocationChanged is ambiguous

The error indicates that there are two signatures for that method:onLocationChanged(List<Location> locations)onLocationChanged(Location location)When using null, the compiler cannot determine...

View Article

Image may be NSFW.
Clik here to view.

Migrating Hibernate mixed inheritance from hbm.xml to orm.xml

Consider the following Java hierarchy:I want the whole hierarchy to be stored in a single table named file, except for SpecialOutFile which should have its dedicated special_file table.This works...

View Article
Browsing latest articles
Browse All 39 View Live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>