Мой класс:
Код: Выделить всё
import com.google.gson.*;
import com.marianof.gms2api.Model.*;
import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.security.SecureRandom;
import java.sql.*;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Random;
@Component
public class BDAdaptor {
@Value("${marianof.bbdd.ip}")
private String dbURL;
@Value("${marianof.bbdd.dbname}")
private String dbName;
@Value("${marianof.bbdd.dbuser}")
private String dbUser;
@Value("${marianof.bbdd.dbpass}")
private String dbPass;
private Connection initDatabase() {
Connection connection = null;
String dbDriver = "com.mysql.cj.jdbc.Driver";
try {
Class.forName(dbDriver);
connection = DriverManager.getConnection(dbURL + dbName, dbUser, dbPass);
} catch (Exception ex) {
ex.printStackTrace();
}
return connection;
}
Код: Выделить всё
marianof.bbdd.ip=jdbc:mysql://myip/
marianof.bbdd.dbname=mydbnam
marianof.bbdd.dbuser=mydbuser
marianof.bbdd.dbpass=mydbpass
Код: Выделить всё
import com.marianof.gms2api.Model.Cliente;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/api/clientes")
public class ClientesController {
private final BDAdaptor bdAdaptor = new BDAdaptor();
@GetMapping("/getClientes")
private String getClientes() {
return bdAdaptor.getClientes();
}
@PostMapping("/modifyCliente")
private String modifyUser(@RequestBody Cliente cliente) {
return bdAdaptor.modifyCliente(cliente);
}
@PostMapping("/deleteCliente")
private String deleteUser(@RequestBody Cliente cliente) {
return bdAdaptor.deleteCliente(cliente);
}
@PostMapping("/addCliente")
private String addUser(@RequestBody Cliente cliente) {
return bdAdaptor.addCliente(cliente);
}
}
Код: Выделить всё
public String getClientes() {
Connection c = null;
ArrayList clientes = new ArrayList();
PreparedStatement preparedStatement = null;
try {
c = this.initDatabase();
preparedStatement = c.prepareStatement("SELECT * FROM clientes");
ResultSet rs = preparedStatement.executeQuery();
while (rs.next()) {
clientes.add(new Cliente(rs.getInt("id"),
rs.getString("nombre"),
rs.getString("apellidos"),
rs.getString("email"),
rs.getString("dni"),
rs.getString("direccion"),
rs.getString("telefono")
)
);
}
} catch (SQLException e) {
throw new RuntimeException(e);
} finally {
try {
c.close();
preparedStatement.close();
} catch (SQLException e) { < b r / > t h r o w n e w R u n t i m e E x c e p t i o n ( e ) ; < b r / > } < b r / > } < b r / > r e t u r n n e w G s o n ( ) . t o J s o n ( c l i e n t e s ) ; < b r / > } < b r / > < b r / > < / c o d e > < b r / > Я п о л у ч а ю с л е д у ю щ у ю о ш и б к у : < / p > < b r / > < c o d e > t o m c a t _ 1 | a t j a v a . s q l / j a v a . s q l . D r i v e r M a n a g e r . g e t C o n n e c t i o n ( D r i v e r M a n a g e r . j a v a : 7 0 8 ) < b r / > t o m c a t _ 1 | a t j a v a . s q l / j a v a . s q l . D r i v e r M a n a g e r . g e t C o n n e c t i o n ( D r i v e r M a n a g e r . j a v a : 2 3 0 ) < b r / > t o m c a t _ 1 | a t c o m . m a r i a n o f . g m s 2 a p i . C o n t r o l l e r . B D A d a p t o r . i n i t D a t a b a s e ( B D A d a p t o r . j a v a : 3 2 ) < b r / > t o m c a t _ 1 | a t c o m . m a r i a n o f . g m s 2 a p i . C o n t r o l l e r . B D A d a p t o r . g e t C l i e n t e s ( B D A d a p t o r . j a v a : 4 5 6 ) < b r / > t o m c a t _ 1 | a t c o m . m a r i a n o f . g m s 2 a p i . C o n t r o l l e r . C l i e n t e s C o n t r o l l e r . g e t C l i e n t e s ( C l i e n t e s C o n t r o l l e r . j a v a : 1 3 ) < b r / > t o m c a t _ 1 | a t j a v a . b a s e / j d k . i n t e r n a l . r e f l e c t . D i r e c t M e t h o d H a n d l e A c c e s s o r . i n v o k e ( D i r e c t M e t h o d H a n d l e A c c e s s o r . j a v a : 1 0 3 ) t o m c a t _ 1 | a t j a v a . b a s e / j a v a . l a n g . r e f l e c t . M e t h o d . i n v o k e ( M e t h o d . j a v a : 5 8 0 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . w e b . m e t h o d . s u p p o r t . I n v o c a b l e H a n d l e r M e t h o d . d o I n v o k e ( I n v o c a b l e H a n d l e r M e t h o d . j a v a : 2 5 5 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . w e b . m e t h o d . s u p p o r t . I n v o c a b l e H a n d l e r M e t h o d . i n v o k e F o r R e q u e s t ( I n v o c a b l e H a n d l e r M e t h o d . j a v a : 1 8 8 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . m v c . m e t h o d . a n n o t a t i o n . S e r v l e t I n v o c a b l e H a n d l e r M e t h o d . i n v o k e A n d H a n d l e ( S e r v l e t I n v o c a b l e H a n d l e r M e t h o d . j a v a : 1 1 8 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . m v c . m e t h o d . a n n o t a t i o n . R e q u e s t M a p p i n g H a n d l e r A d a p t e r . i n v o k e H a n d l e r M e t h o d ( R e q u e s t M a p p i n g H a n d l e r A d a p t e r . j a v a : 9 2 5 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . m v c . m e t h o d . a n n o t a t i o n . R e q u e s t M a p p i n g H a n d l e r A d a p t e r . h a n d l e I n t e r n a l ( R e q u e s t M a p p i n g H a n d l e r A d a p t e r . j a v a : 8 3 0 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . m v c . m e t h o d . A b s t r a c t H a n d l e r M e t h o d A d a p t e r . h a n d l e ( A b s t r a c t H a n d l e r M e t h o d A d a p t e r . j a v a : 8 7 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . D i s p a t c h e r S e r v l e t . d o D i s p a t c h ( D i s p a t c h e r S e r v l e t . j a v a : 1 0 8 9 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . D i s p a t c h e r S e r v l e t . d o S e r v i c e ( D i s p a t c h e r S e r v l e t . j a v a : 9 7 9 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . F r a m e w o r k S e r v l e t . p r o c e s s R e q u e s t ( F r a m e w o r k S e r v l e t . j a v a : 1 0 1 4 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . F r a m e w o r k S e r v l e t . d o G e t ( F r a m e w o r k S e r v l e t . j a v a : 9 0 3 ) < b r / > t o m c a t _ 1 | a t j a k a r t a . s e r v l e t . h t t p . H t t p S e r v l e t . s e r v i c e ( H t t p S e r v l e t . j a v a : 5 6 4 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . w e b . s e r v l e t . F r a m e w o r k S e r v l e t . s e r v i c e ( F r a m e w o r k S e r v l e t . j a v a : 8 8 5 ) < b r / > t o m c a t _ 1 | a t j a k a r t a . s e r v l e t . h t t p . H t t p S e r v l e t . s e r v i c e ( H t t p S e r v l e t . j a v a : 6 5 8 ) < b r / > t o m c a t _ 1 | a t o r g . a p a c h e . c a t a l i n a . c o r e . A p p l i c a t i o n F i l t e r C h a i n . i n t e r n a l D o F i l t e r ( A p p l i c a t i o n F i l t e r C h a i n . j a v a : 1 9 6 ) < b r / > t o m c a t _ 1 | a t o r g . a p a c h e . c a t a l i n a . c o r e . A p p l i c a t i o n F i l t e r C h a i n . d o F i l t e r ( A p p l i c a t i o n F i l t e r C h a i n . j a v a : 1 4 0 ) < b r / > t o m c a t _ 1 | a t o r g . a p a c h e . t o m c a t . w e b s o c k e t . s e r v e r . W s F i l t e r . d o F i l t e r ( W s F i l t e r . j a v a : 5 1 ) < b r / > t o m c a t _ 1 | a t o r g . a p a c h e . c a t a l i n a . c o r e . A p p l i c a t i o n F i l t e r C h a i n . i n t e r n a l D o F i l t e r ( A p p l i c a t i o n F i l t e r C h a i n . j a v a : 1 6 5 ) < b r / > t o m c a t _ 1 | a t o r g . a p a c h e . c a t a l i n a . c o r e . A p p l i c a t i o n F i l t e r C h a i n . d o F i l t e r ( A p p l i c a t i o n F i l t e r C h a i n . j a v a : 1 4 0 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . O n c e P e r R e q u e s t F i l t e r . d o F i l t e r ( O n c e P e r R e q u e s t F i l t e r . j a v a : 1 1 0 ) < b r / > t o m c a t _ 1 | a t o r g . a p a c h e . c a t a l i n a . c o r e . A p p l i c a t i o n F i l t e r C h a i n . i n t e r n a l D o F i l t e r ( A p p l i c a t i o n F i l t e r C h a i n . j a v a : 1 6 5 ) < b r / > t o m c a t _ 1 | a t o r g . a p a c h e . c a t a l i n a . c o r e . A p p l i c a t i o n F i l t e r C h a i n . d o F i l t e r ( A p p l i c a t i o n F i l t e r C h a i n . j a v a : 1 4 0 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . C o m p o s i t e F i l t e r $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( C o m p o s i t e F i l t e r . j a v a : 1 0 8 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y . l a m b d a $ d o F i l t e r I n t e r n a l $ 3 ( F i l t e r C h a i n P r o x y . j a v a : 2 3 1 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 6 5 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . a c c e s s . i n t e r c e p t . A u t h o r i z a t i o n F i l t e r . d o F i l t e r ( A u t h o r i z a t i o n F i l t e r . j a v a : 1 0 0 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . a c c e s s . E x c e p t i o n T r a n s l a t i o n F i l t e r . d o F i l t e r ( E x c e p t i o n T r a n s l a t i o n F i l t e r . j a v a : 1 2 6 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . a c c e s s . E x c e p t i o n T r a n s l a t i o n F i l t e r . d o F i l t e r ( E x c e p t i o n T r a n s l a t i o n F i l t e r . j a v a : 1 2 0 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . s e s s i o n . S e s s i o n M a n a g e m e n t F i l t e r . d o F i l t e r ( S e s s i o n M a n a g e m e n t F i l t e r . j a v a : 1 3 1 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . s e s s i o n . S e s s i o n M a n a g e m e n t F i l t e r . d o F i l t e r ( S e s s i o n M a n a g e m e n t F i l t e r . j a v a : 8 5 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . a u t h e n t i c a t i o n . A n o n y m o u s A u t h e n t i c a t i o n F i l t e r . d o F i l t e r ( A n o n y m o u s A u t h e n t i c a t i o n F i l t e r . j a v a : 1 0 0 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . s e r v l e t a p i . S e c u r i t y C o n t e x t H o l d e r A w a r e R e q u e s t F i l t e r . d o F i l t e r ( S e c u r i t y C o n t e x t H o l d e r A w a r e R e q u e s t F i l t e r . j a v a : 1 7 9 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . s a v e d r e q u e s t . R e q u e s t C a c h e A w a r e F i l t e r . d o F i l t e r ( R e q u e s t C a c h e A w a r e F i l t e r . j a v a : 6 3 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > t o m c a t _ 1 | a t c o m . m a r i a n o f . g m s 2 a p i . S e c u r i t y . A p i K e y A u t h F i l t e r . d o F i l t e r I n t e r n a l ( A p i K e y A u t h F i l t e r . j a v a : 2 4 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . O n c e P e r R e q u e s t F i l t e r . d o F i l t e r ( O n c e P e r R e q u e s t F i l t e r . j a v a : 1 1 6 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . a u t h e n t i c a t i o n . l o g o u t . L o g o u t F i l t e r . d o F i l t e r ( L o g o u t F i l t e r . j a v a : 1 0 7 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . a u t h e n t i c a t i o n . l o g o u t . L o g o u t F i l t e r . d o F i l t e r ( L o g o u t F i l t e r . j a v a : 9 3 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . h e a d e r . H e a d e r W r i t e r F i l t e r . d o H e a d e r s A f t e r ( H e a d e r W r i t e r F i l t e r . j a v a : 9 0 ) t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . h e a d e r . H e a d e r W r i t e r F i l t e r . d o F i l t e r I n t e r n a l ( H e a d e r W r i t e r F i l t e r . j a v a : 7 5 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . O n c e P e r R e q u e s t F i l t e r . d o F i l t e r ( O n c e P e r R e q u e s t F i l t e r . j a v a : 1 1 6 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . c o n t e x t . S e c u r i t y C o n t e x t H o l d e r F i l t e r . d o F i l t e r ( S e c u r i t y C o n t e x t H o l d e r F i l t e r . j a v a : 8 2 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . c o n t e x t . S e c u r i t y C o n t e x t H o l d e r F i l t e r . d o F i l t e r ( S e c u r i t y C o n t e x t H o l d e r F i l t e r . j a v a : 6 9 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . c o n t e x t . r e q u e s t . a s y n c . W e b A s y n c M a n a g e r I n t e g r a t i o n F i l t e r . d o F i l t e r I n t e r n a l ( W e b A s y n c M a n a g e r I n t e g r a t i o n F i l t e r . j a v a : 6 2 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . O n c e P e r R e q u e s t F i l t e r . d o F i l t e r ( O n c e P e r R e q u e s t F i l t e r . j a v a : 1 1 6 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . s e s s i o n . D i s a b l e E n c o d e U r l F i l t e r . d o F i l t e r I n t e r n a l ( D i s a b l e E n c o d e U r l F i l t e r . j a v a : 4 2 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . O n c e P e r R e q u e s t F i l t e r . d o F i l t e r ( O n c e P e r R e q u e s t F i l t e r . j a v a : 1 1 6 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 3 7 4 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y . d o F i l t e r I n t e r n a l ( F i l t e r C h a i n P r o x y . j a v a : 2 3 3 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . w e b . F i l t e r C h a i n P r o x y . d o F i l t e r ( F i l t e r C h a i n P r o x y . j a v a : 1 9 1 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e w o r k . w e b . f i l t e r . C o m p o s i t e F i l t e r $ V i r t u a l F i l t e r C h a i n . d o F i l t e r ( C o m p o s i t e F i l t e r . j a v a : 1 1 3 ) < b r / > t o m c a t _ 1 | a t o r g . s p r i n g f r a m e work.web.servlet.handler.HandlerMappingIntrospector.lambda$createCacheFilter$3(HandlerMappingIntrospector.java:195)
tomcat_1 | at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
tomcat_1 | at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74)
tomcat_1 | at org.springframework.security.config.annotation.web.configuration.WebMvcSecurityConfiguration$CompositeFilterChainProxy.doFilter(WebMvcSecurityConfiguration.java:230)
tomcat_1 | at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:352)
tomcat_1 | at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:268)
tomcat_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:165)
tomcat_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
tomcat_1 | at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
tomcat_1 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
tomcat_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:165)
tomcat_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
tomcat_1 | at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
tomcat_1 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
tomcat_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:165)
tomcat_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
tomcat_1 | at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:124)
tomcat_1 | at org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:99)
tomcat_1 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
tomcat_1 | at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:117)
tomcat_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:165)
tomcat_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
tomcat_1 | at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
tomcat_1 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
tomcat_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:165)
tomcat_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
tomcat_1 | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
tomcat_1 | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
tomcat_1 | at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
tomcat_1 | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
tomcat_1 | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
tomcat_1 | at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:673)
tomcat_1 | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
tomcat_1 | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
tomcat_1 | at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391)
tomcat_1 | at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
tomcat_1 | at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896)
tomcat_1 | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1736)
tomcat_1 | at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
tomcat_1 | at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
tomcat_1 | at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
tomcat_1 | at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
tomcat_1 | at java.base/java.lang.Thread.run(Thread.java:1583)
tomcat_1 | 2024-07-30T00:18:00.627Z ERROR 1 --- [gms2api] [io-8443-exec-22] o.s.b.w.servlet.support.ErrorPageFilter : Forwarding to error page from request [/api/clientes/getClientes] due to exception [Cannot invoke "java.sql.Connection.close()" because "c" is null]
Подробнее здесь: https://stackoverflow.com/questions/788 ... e-variable
Мобильная версия