This week's book giveaways are in the Jython/Python and Object-Oriented programming forums.
We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!

Andrey Dmitriev

Ranch Hand
+ Follow
since Jan 04, 2019
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Andrey Dmitriev


I'm trying to apply formatter-annotation to the field "phone" in next model-class:

Interface for annotation:





And it does not work: phone-values saved in database, but in non-formatted form.

Note: when I run test in debug with breakpoint on PhoneFormatter, test passes susseccfully. That means, that my Formatter is out of process. But when I set breakpoint on PhoneFormatAnnotationFormatterFactory.getFieldTypes, test interrupted.

In particular, debug with breakpoint on return Collections.singleton(String.class); in

shows that the class PhoneFormatAnnotationFormatterFactory has no fields...
1 week ago
   The problem is solved.
   I add "classpath:spring/spring-db.xml" in param-values of contextConfigLocation in my web.xml:

  Thank for trying to help!
1 week ago
  Himai Minh, I not using Boot...
1 week ago





in pom

  But I catch the:

1 week ago

  I created a simple RestController, usin Spring (not Boot).

  I successfully started it with


      In Concole I see the output of  System.out.println(userRestController.get(2)); So my CRUD-methods works good.

      But, trying to use curl, I see:


  Indeed, in terminal I see, that no application listening port 8080.

2 weeks ago
Tim Moores

  I dont understand now how can I  access  to  database by unit-socket,  using psql.

 In a case of TCP-port  I  run the following  "psql -h -p 5432 -d test_psql"
  And Postgres is indeed running on your local machine on that port?
  Yes.  Application and database mounted on one and the same server with host:
  TCP-connrction between them is posible, but will be not so fast as by unix-socket
I add to pom dependencies:

And change url to this:

I receive in stack now:

  Yes, I tried.

  In stack:

rg.postgresql.util.PSQLException: Connection to refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
  Tim Moores,
 I try "jdbc:postgresql://localhost/test_psql" and receive the same error
     I use TCP-connection to remote postgre-database by:

   And it working successfully.

   But I cant use UNIX-Socket connection:

    PostgreSQL-version 9.2

Greetings to all!
    I have the task to run a java-web-application  in  Plesk-server.

    Since Plesk does not support tomcat java applications directly,  my team-lead set me the following subtasks:
1. locate my web-application in Docker-container;
2. Run this container in sub-domain of Plesk.

   I solved the first subtask successfully. In particular, I added my war in docker-directory, run the container and pushed in Docker Hub-repository.
   Then my repository uploaded in Plesk.

   At the next stage I need to locate files of my web-project in files-directory of domain in Plesk.
   But, I have not clear idea how to do this...  By file-manager I can upload only zip-archive (not war!).
1 month ago
    The problem is solved (in general):
    working code:

  I hope, it will be use for somebody!
1 month ago
    Greetings to all!

    I have a working xml-configuratin:

     Also I have "root-class":

    When user is not authorised it passed on "login"-page.

   I try to migrate this configuration to java-formate:

  But it does not work.  User redirected on "meals" (instead "login"  in case of  "non-authorised")
1 month ago
  I have found the solution.
  I commented  "<entry key="#{T(org.hibernate.cfg.AvailableSettings).DIALECT}" value="org.hibernate.dialect.SQLServerDialect"/>" in spring-configuation. And now test passing successfully!
  But the reason of success I understand only intuitively yet