Leinad Nongag

Greenhorn
+ Follow
since Aug 25, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Leinad Nongag

Hello everybody,

it seems the @Repository options isn't working, I still get those bean errors.

But this time I build the Configuration in Java class.  But yet, I have problems with my Validator Bean and my CrudRepository<T,Long>, QuerydslPredicateExecutor<T>.

Maybe those two plugins doesn't work well together, ILl have to stick to my services.
5 years ago
Thank you All Hobbs, I will try to use @Repository.  I've seen examples where it wasn't used, or other with the @NoRepositoryBean, but no of those example were complete.
5 years ago
It's because they are Interfaces and not Classes.  Most of the examples I've seen does the same thing.  You extend your intertface with CrudRepository<T,O> for implementing the basic database commands and then, the QuerydlsPredicateExecutor<T> for genarating the  type safe query API.

After that, you can generate Q[your_query_name] object that you can use to create your own query :



It's very useful !
5 years ago

Rob Spoor wrote:Leinad, your code is very vulnerable for SQL injection. If you're going to use JDBC directly, you should at least use a PreparedStatement.



I know, it's only examples I took from tutorials.
5 years ago
5 years ago
Are you directly querying your database, or are you using JPA API between your database and your application ?



5 years ago
This is my spring-servlet config :



I tried to send more files but it seems I can't upload zip files  
5 years ago







This is my pom
5 years ago
Hello everybody,

I'm trying to understand how I must configurate my application for using a CrudRepository<T,Long>, QuerydslPredicateExecutor<T> Interface to create a Bean and the implementation class on the run time.

I'm using Java 10 with Spring JPA, Hibernate, Spring MVC and an Oracle 11G XE Database.  I had no problems when I was mapping actual tables.  It was very easy, but I wanted to use QueryDSL mapped on a view instead of a table.  I've seen many example on the web where the writers simply just create the CrudRepository<T,Long>, QuerydslPredicateExecutor<T> interface and inject it in an object with the @Autowired annotation.  Those examples are working very well, but the configuration is totally different from my application's configuration.  I want to do the same, but for a reason I do not understand, I'm getting only errors on the run time saying they can't find the qualified Bean name for my private attribute of type that is implementing CrudRepository<T,Long>, QuerydslPredicateExecutor<T>;





Thank you !

5 years ago
No, I didn't found the solution.

If you know something, I would be glad to read your anser.

Thank you !
9 years ago
JSF
Well I found a way to resolve my problem and I created a custom property loader. So, now I can add as many properties I want that way :


Both files goes into a jar that is both refrence by the tomcat server and the web application





Into the web app web.xml


Into the server's context.xml


Everything is working fine with that.


When you need to read the value you do like this :

So I was able to making work the previous example, now, I only have to pass a single string parameter from the server to the application.

Something like

<env-entry>

But I have yet to provide the link between the two configs.

I'll continie to search the web.
Hi,

I'm still searching the web and I found something that looks interesting.



I want to do something like that, define the server connection as a global property from the server.xml and use it in the context.xml . I would like to mix both since I'm using Spring in my webapp. I want to set the database connection info and to add other properties.

Can I add any more properties there and how do I apply them into our files ?

Hello everybody,

I'm building a java web application that will be in the future deployed in multiple environment. And to simplify the deployment, I would like to use container-base properties without having to edit the property files for each environment. So far, I have only 6 properties that might change depending on the environment.

I've seen many examples that seemed very complex for what I must do. I don't want to mix the JARs in my WAR with those from the container. I just want something that is as simple as loading a property file in the container that will be available to use in the WAR.

I'm really new to JNDI, thought I used them in the past, not knowing how to create one.

Can someone direct me to a simple example ? Something really basic.

Thank you !
Hello everybody,

I got a really annoying problem with the importation of LDIF file into my own LDAP server application. My LDAP server is working really well and I'm able to add and remove entry. But when it's time to applying an LDIF file, it's where it doesn't seem to work.

My goal is to create by programation an LDAP server for JUnit test, it must work without any servlet configuration file and external tools. It must be completely autonomous within the JUnit test.

I made some serachs with Google and I haven't found a working solution, so far, one doesn't create error but is doing nothing and the other is throwing exceptions :




This seems very simple, it does not throw exception, but I see no changes on my ldap server. I don't understand why ?




That one throws exceptions like this :



Why should it care about an existing LdapName ? I want to remove everything a start a new with that new LDIF file. If you have any ideas on how I can clear the directories and import a new with an LDIF file without using servlets and xml configurations, please tell me.
10 years ago