Spring MVC
Whenever I Click on the endpoint then my console is starting printing the image of the user in binary format that cause alot of lagging and stopping my program. Please Help.
https://srcb.in/wGaSDYunV1p
56 Replies
ā
This post has been reserved for your question.
Hey @Danix! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
Sorry here is the correct code link https://sourceb.in/wGaSDYunV1
It looks like you are having issues with debugging or issues that can be solved using a debugger.
Check out this article on dev.java to see how debugging works and how to use a debugger.
This Stack Overflow question and its answers also explain debugging in general.
These links describe how to use the debugger in some IDEs:
ā¢ Debugging in IntelliJ
ā¢ Debugging in Eclipse
I guess it's printed inside
finderUserImp.findByEmail(email)
or maybe somewhere during view renderingI look inside the finderuserImp.findbyemail as well but not print statement was there ? @dan1st | Daniel
This is what happens
ok that seems to be debug logging from JSTL
There are multiple ways of dealing with that
Firstly, you could just disable debug logging so you don't get that output (assuming you don't need it)
ok
These are the starting lines of the conosle
but how to disable it
Do you have an application.properties?
If yes, can you please show it (ideally as text like you just did with the output here)
nahh i dont have any application.properties bcz i am using simple Spring MVC not spring boot
another way is to limit the console output. You can do that in the preferences under Run/Debug>Console/Limit console output
Do you have any logging configuration? For example a logback.xml?
no i am not using spring security as well but i have this
Any other files related to logging? Are you passing any system properties?
Can you show your dependencies?
that option should work independently of that
what do u mean by the term logging ?
@
@dan1st | Daniel
Logging is when you there is diagnostic output from your application
Which is done by a library (in your case logback)
You could try something like this if you want to disable debug logging: https://stackoverflow.com/a/58746885/10871900
Stack Overflow
Disable DEBUG level logs in logback.xml keeping INFO and ERROR leve...
My logback.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<jmxConfigurator/>
<statusListener class="ch.qos.logback.core.status.NopStatusListen...
but this problem is suddenly arrives bcz yesterday its not giving any issue but today it is ? why
Stack Overflow
How to disable debug logs in spring
How to disable debug mode in my spring application. When i run my application in production it gives lot of debug logs statements and tomcat's log file take more space in disk. like below,
05:03:2...
Was the image also printed before today?
If the issue is Eclipse not responding, you can fix that by limiting the output
yehh
If you want Spring to stop putting that in the console, that's a different issue with a different fix
https://discord.com/channels/648956210850299986/1251539126163869802/1251553366220214302
another way is to limit the console output. You can do that in the preferences under Run/Debug>Console/Limit console output
What's shown when opening that preference page?
i did it but the output is coming same
reduce the 320000 to a lower number
how much ?
you could try 32000
essentially higher number --> more lag but also more can be displayed in the console
lower number-->less lag but you can also not display that much text in the console (it will erase what was printed at the beginning)
still lagg alot even the ecplise not opening
?
It is specifically about responding when there's a lot of text in the console
but why the problem is occuring
With the output making Eclipse not respond? Well having a high number there means that Eclipse has to display a lot of text which can be slow
but why the binary number is printing ?
That's probably because debug logging is enabled
and you should be able to disable it with that
Like JSTL (the thing running JSP) is probably configured to print attributes to the console when debug logging is enabled
so how can i off it through the post u send me ?
So you have no logback.xml, right?
yehh
Then you can probably turn it off by creating a logback.xml in your src/main/resources with a content similar like this:
You might need to change
<root level="DEBUG">
to <root level="INFO">
but I don't think that's necessaryso where should i have to add it
In
src/main/resources/logback.xml
I thinkyehh that solved the issue but how is this occuring and why even if i am not printing the image byte
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
?
It's not you printing it
It's JSTL (a library you are using) printing it
As I said before, JSTL is the thing that reads JSP files and converts HTML from it
hmm ok ok but if i got any error then the console will print it right ?
Can u give me a advice today i have completed my Spring JPA module so should i start Spring rest or spring security ?
it should
Depending on what is important to you
But you might want to consider using Spring Boot
yehh i started it
they are new to me thats why i am asking to u bro
Both are important tbh
I think Spring JPA is probably the more complicated one
do u have any doc where could i see all the topics cover under Spring JPA
š¤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.