This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Building Blockchain Apps and have Michael Yuan on-line!
See this thread for details.
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!

Andrey Dmitriev

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

Recent posts by Andrey Dmitriev

  I'm still "anchored"....
2 weeks ago
 Hello!

 I have the following maven-dependency:



 Project-properties:



And try to use it by spring-xml-configuration:



SDK is 11.0.6.

I tried:
1. Rebuild project.

2. Invalidate Caches/Restart

3. Maven Clean/Install.  But Install failed by the reason of:

 
     Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project user_service: Fatal error compiling


Help me, please!!!  I almost a day battle with this problem


2 weeks ago
    I have found the solution:

   I add separate controller:

 

And conroller for the root-mappring:



new spring-config:



Besides I remain @RestController.  

So this solution cost for my project architecture-sophistication...
1 month ago
Hibernate properties are represent as:




Postgres-driver is 42.2.10
Spring Data JPA

In general hybernate working well: it provides all CRUD-operations.

But if try to update my Entity (for example, by adding new field), assigned table in database is not changing.

 
    I add to spring-mvc.xml the following:

 

   and controller:



directory: test/webapp/access_approved.html.


It redirects me on http://localhost:8080/test/access_approved.    But with the same 404-error.

I tried "forward:access_approved"
But it forwards me on http://localhost:8080/test/
1 month ago

Stephan van Hulst wrote:I mean, what is the literal file name of the built WAR, including the .war extension?



test.war
1 month ago
   text:war
   test:war eplored

Application context:  /test

spring-app



spring-db:



spring-mvc:






1 month ago
http://localhost:8080/test/

web-xml:



context.xml:







1 month ago
Stephan van Hulst, yes, i understand, that it was bad idea to test @RestController on redirecting on localpages inside webapp.

But now I'am trying to run my simple index.html page during running tomcat-app. Without any methods-invoking.
test/webapp/index.html.

But I receive the same error: 404.

1 month ago

Stephan van Hulst wrote:What is the absolute URI that you are redirected to, and where under the webapp folder are your views located?



  absolute URL is   localhost:8080/test/

  webbapp-folder in a root of project, named "test"

  test/webapp/access_approved.html

  test/webapp/WEB-INF/web.xml
 test/webapp/WEB-INF/access_denied.xml
1 month ago
I'am trying to test my @RestController on abbility of redirecting.

For testing aims it must redirect on localhost.



Servlet mapping is:



I run application and enter, for example:



But I receive an 404-error.

When I use instead of "access_approved" absolute-path of real-sites (for example, "https://stackoverflow.com/") its working well.

So, the problem is focused on pages, which located at my-project-structure.

In my webapp-directory I have 2 html-files:

access_denied.html
access_approved.html.


1 month ago
Hello!

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



Interface for annotation:



Formatter:



Annotation-factory:



FormatterRegistrar:



config:




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 month 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 month ago