What do you want to save?
Add Code snippet
New code examples
-
Java 2022-03-16 22:45:35
spring boot access images in resources folder
@SpringBootApplication public class MainApplication implements WebMvcConfigurer { private static Logger logger = LoggerFactory.getLogger(MainApplication.class.getName()); @Override public void addResourceHandlers(ResourceHandlerRegistry regi... Add solution -
Other 2022-02-09 17:15:41
how do you use log4j
How do you use Log4J in your framework? Basically it is printing/logging the important events of the application/test run. in my project I did logging using the log4j library. I added the library dependency into pom.xml. For logging we create an object fr... Add solution -
Other 2022-02-07 19:45:03
how to logs
How do you use Log4J in your framework? printing/logging the important events of the application/test run. in my project I did logging using the log4j library. I added the library dependency into pom.xml. For logging we create an object from Logger Interf... Add solution -
Other 2022-02-02 21:25:22
spring job scheduler
/* * Copyright 2012-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * ... Add solution -
Java 2021-11-12 07:56:17
httpservletrequest in spring boot
package com.onclickinfo.tnoadmin; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servl... Add solution -
Java 2021-10-20 21:49:06
Read File from Sprinboot
Using ResourceUtil @Override public void run(String... args) throws Exception { File file = ResourceUtils.getFile("classpath:data.txt"); if(file.exists()) { byte[] fileData = Files.readAllBytes(file.toPath()); String fileContent = ne... Add solution -
Other 2021-10-13 13:27:16
how to use log4j
How do you use Log4J in your framework? Basically it is printing/logging the important events of the application/test run. in my project I did logging using the log4j library. I added the library dependency into pom.xml. For logging we create an object fr... Add solution -
Java 2021-10-08 13:56:09
java how to call getReader twice
public class CustomHttpServletRequestWrapper extends HttpServletRequestWrapper { private static final Logger logger = Logger.getLogger(CustomHttpServletRequestWrapper.class); private final String body; public CustomHttpServletRequestWrapper(HttpServletR... Add solution -
Other 2021-10-03 19:05:03
log4j
How do you use Log4J in your framework? printing/logging the important events of the application/test run. in my project I did logging using the log4j library. I added the library dependency into pom.xml. For logging we create an object from Logger Interf... Add solution