Code Monkey home page Code Monkey logo

springboot's Issues

spring静态资源问题

老版本WebMvcConfigurerAdapter配置的addResourceHandlers静态资源路径能正常访问,新版的WebMvcConfigurationSupport配置静态资源路径就访问不到了。资源路径都是一样的。

springboot-mybatis

老铁,这是你自己封装的包吧:

com.jf
page-mysql
1.0

我找不到这个包啊

implements ApplicationListener<ApplicationStartedEvent>

SpringBoot打包成war包后继承ApplicationListener类都无效了

SpringApplication builder = new SpringApplication(Application.class);
builder.addListeners(new ApplicationListenerEnvironmentPrepared()); //extend ApplicationListener
builder.addListeners(new ApplicationListenerFailed()); //extend ApplicationListener
builder.addListeners(new ApplicationListenerPrepared()); //extend ApplicationListener
builder.addListeners(new ApplicationListenerStarting()); //extend ApplicationListener

error

CustomUserService 36行 添加权限的参数是用户名

springboot-SpringSecurity4 如何登入?

请问springboot-SpringSecurity4这个项目,如何登入呢?直接访问 /login地址吗?需要传入什么参数?

我现在是需要服务级别的相互调用,使用springsecurity来鉴权。感谢

springboot-Security,authentication not attempted

按照这个项目写的,我的表里只用户,角色跟权限表里没数据,
登录后什么网址都能访问,权限没用
控制台显示如下信息:
2017-03-05 13:03:10.567 DEBUG 13087 --- [ XNIO-2 task-22] o.z.m.s.MyFilterSecurityInterceptor : Public object - authentication not attempted

yml 中变量设置问题

配置类中的 getter 方法不标准时,有时会导入变量 inject 失败
yml 文件
person:
iname: john
age: 11
配置类
@ConfigurationProperties(prefix = "person")
void setIname(String name){ ... }
public String getIName(){ ... }

Spring security 自定义登录页面问题

.and()
                .formLogin()
                .loginPage("/admin_login.html")
                .usernameParameter("username")
                .passwordParameter("password")
                .loginProcessingUrl("/form/login")
                .defaultSuccessUrl("/index")
                .successForwardUrl("/index")

不知道为什么?感觉这几个设置不生效,成功了不会跳index 而是跳 /form/login

注入问题

org.springframework.cloud spring-cloud-starter-parent Dalston.RELEASE

请问楼主,我用的这个版本,MyFilterSecurityInterceptor 注入报错,请问需要如何处理
org.springframework.boot.context.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:63) - Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'customFilterSecurityInterceptor' defined in file [/Users/XXX/Documents/workspace/java/practice/demo/admin-server/target/classes/com/bfsj/console/server/base/security/services/CustomFilterSecurityInterceptor.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: An AccessDecisionManager is required

Springboot主线程退出,但是java进程还活着。希望给点线索

2019-07-23 20:25:10 [org.springframework.kafka.listener.AbstractMessageListenerContainer$2:366] INFO org.springframework.kafka.listener.KafkaMessageListenerContainer - partitions assigned: [addGatewayDevice-0, addGatewayDevice-2, addGatewayDevice-1]2019-07-23 21:50:25 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-4, groupId=iotsdkservermgr] Node 2 was unable to process the fetch request with (sessionId=987152831, epoch=10154): INVALID_FETCH_SESSION_EPOCH.
2
2019-07-23 20:25:35 [org.springframework.context.support.AbstractApplicationContext:554] WARN org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'org.springframework.kafka.config.internalKafkaListenerEndpointRegistry'; nested exception is org.apache.kafka.common.errors.TimeoutException: Timeout expired while fetching topic metadata
2019-07-23 20:25:35
[org.springframework.scheduling.concurrent.ExecutorConfigurationSupport:208] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor - Shutting down ExecutorService 'applicationTaskExecutor'
2019-07-23 20:25:35 [org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer:1190] INFO org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer - Shutdown ignored - container is not active already
2019-07-23 20:25:35 [com.mongodb.diagnostics.logging.SLF4JLogger:71] INFO org.mongodb.driver.connection - Closed connection [connectionId{localValue:4}] to mongos-svc:27017 because the pool has been closed.
2019-07-23 20:25:35 [com.mongodb.diagnostics.logging.SLF4JLogger:71] INFO org.mongodb.driver.connection - Closed connection [connectionId{localValue:2}] to mongos-svc:27017 because the pool has been closed.
2019-07-23 20:25:35 [org.apache.juli.logging.DirectJDKLog:173] INFO org.apache.catalina.core.StandardService - Stopping service [Tomcat]
2019-07-23 20:25:35 [org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener:142] INFO org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener -

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-07-23 20:25:35 [org.springframework.boot.SpringApplication:858] ERROR org.springframework.boot.SpringApplication - Application run failed
org.springframework.context.ApplicationContextException: Failed to start bean 'org.springframework.kafka.config.internalKafkaListenerEndpointRegistry'; nested exception is org.apache.kafka.common.errors.TimeoutException: Timeout expired while fetching topic metadata
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:185)
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:53)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360)
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158)
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:879)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
at com.h3c.iot.IotsdkservermgrApplication.main(IotsdkservermgrApplication.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: org.apache.kafka.common.errors.TimeoutException: Timeout expired while fetching topic metadata
2019-07-23 21:04:04 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-6, groupId=iotsdkservermgr] Node 0 was unable to process the fetch request with (sessionId=2075377223, epoch=4257): INVALID_FETCH_SESSION_EPOCH.
2019-07-23 21:07:41 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-2, groupId=iotsdkservermgr] Node 0 was unable to process the fetch request with (sessionId=609016071, epoch=4700): INVALID_FETCH_SESSION_EPOCH.
2019-07-23 21:20:34 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-8, groupId=iotsdkservermgr] Node 1 was unable to process the fetch request with (sessionId=1414506249, epoch=6592): INVALID_FETCH_SESSION_EPOCH.
019-07-23 21:57:35 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-2, groupId=iotsdkservermgr] Node 2 was unable to process the fetch request with (sessionId=1581749342, epoch=11037): INVALID_FETCH_SESSION_EPOCH.
2019-07-23 22:21:44 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-8, groupId=iotsdkservermgr] Node 1 was unable to process the fetch request with (sessionId=864693921, epoch=7289): INVALID_FETCH_SESSION_EPOCH.
2019-07-23 22:34:19 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-6, groupId=iotsdkservermgr] Node 1 was unable to process the fetch request with (sessionId=1494210423, epoch=15377): INVALID_FETCH_SESSION_EPOCH.
2019-07-23 22:54:11 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-6, groupId=iotsdkservermgr] Node 1 was unable to process the fetch request with (sessionId=1564129696, epoch=2367): INVALID_FETCH_SESSION_EPOCH.
2019-07-23 23:03:10 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-4, groupId=iotsdkservermgr] Node 0 was unable to process the fetch request with (sessionId=1117881135, epoch=18080): INVALID_FETCH_SESSION_EPOCH.
2019-07-23 23:07:27 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-2, groupId=iotsdkservermgr] Node 2 was unable to process the fetch request with (sessionId=31438056, epoch=8327): INVALID_FETCH_SESSION_EPOCH.
2019-07-23 23:07:27 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-2, groupId=iotsdkservermgr] Node 1 was unable to process the fetch request with (sessionId=663747677, epoch=19353): INVALID_FETCH_SESSION_EPOCH.
2019-07-23 23:12:13 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-2, groupId=iotsdkservermgr] Node 1 was unable to process the fetch request with (sessionId=866581978, epoch=567): INVALID_FETCH_SESSION_EPOCH.
2019-07-23 23:37:08 [org.apache.kafka.clients.FetchSessionHandler:383] INFO org.apache.kafka.clients.FetchSessionHandler - [Consumer clientId=consumer-6, groupId=iotsdkservermgr] Node 0 was unable to process the fetch request with (sessionId=1424368118, epoch=17737): INVALID_FETCH_SESSION_EPOCH.

sql

大神,不能把建数据库sql语句提供一下,刚开始学习springboot

书写问题

该路径下 springBoot/springboot-mybatis2/src/main/resources/local/application.properties

第49行:smybatis.type-aliases-package=cn.abel.bean
应该是:mybatis.type-aliases-package=cn.abel.bean这样吧,前面‘s’是误写吗?

db

你好,数据库脚本 能发一份吗

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.