Răsfoiți Sursa

修改题目提交接口

4228306 6 ani în urmă
părinte
comite
b2b912800f

+ 1 - 0
.gitignore

@@ -15,6 +15,7 @@
 *.iws
 *.iml
 *.ipr
+*.log
 
 ### NetBeans ###
 /nbproject/private/

+ 33 - 0
log/logback-error-%d{yyyy-MM-dd}.log

@@ -337,3 +337,36 @@ org.springframework.security.authentication.BadCredentialsException: user admin
 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 	at java.lang.Thread.run(Thread.java:748)
+2019-08-31 13:53:07.943 logback [main] ERROR o.s.boot.SpringApplication - Application run failed
+org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.RuntimeException: java.lang.NullPointerException
+	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:157)
+	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
+	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 edu.math.diagnosis.BootApplication.main(BootApplication.java:16)
+Caused by: java.lang.RuntimeException: java.lang.NullPointerException
+	at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:252)
+	at org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory.createDeploymentManager(UndertowServletWebServerFactory.java:284)
+	at org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory.getWebServer(UndertowServletWebServerFactory.java:208)
+	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:181)
+	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:154)
+	... 8 common frames omitted
+Caused by: java.lang.NullPointerException: null
+	at io.undertow.servlet.core.ManagedServlet.setupMultipart(ManagedServlet.java:107)
+	at io.undertow.servlet.spec.ServletRegistrationImpl.setMultipartConfig(ServletRegistrationImpl.java:117)
+	at org.springframework.boot.web.servlet.ServletRegistrationBean.configure(ServletRegistrationBean.java:201)
+	at org.springframework.boot.web.servlet.ServletRegistrationBean.configure(ServletRegistrationBean.java:51)
+	at org.springframework.boot.web.servlet.DynamicRegistrationBean.register(DynamicRegistrationBean.java:115)
+	at org.springframework.boot.web.servlet.RegistrationBean.onStartup(RegistrationBean.java:54)
+	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:235)
+	at org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory$Initializer.onStartup(UndertowServletWebServerFactory.java:616)
+	at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:203)
+	at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:185)
+	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
+	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
+	at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:250)
+	... 12 common frames omitted

+ 152 - 0
log/logback-info-%d{yyyy-MM-dd}.log

@@ -91,3 +91,155 @@ Error starting ApplicationContext. To display the conditions report re-run your
 2019-08-29 20:30:17.979 logback [XNIO-1 task-5] INFO  e.m.d.config.LoginSuccessHandler - user admin with type admin,login from student
 2019-08-29 20:30:44.832 logback [XNIO-1 task-7] INFO  e.m.d.config.LoginSuccessHandler - user admin with type admin,login from admin
 2019-08-29 20:34:11.686 logback [XNIO-1 task-9] INFO  e.m.d.config.LoginSuccessHandler - user admin with type admin,login from student
+2019-08-31 13:53:04.275 logback [main] INFO  edu.math.diagnosis.BootApplication - Starting BootApplication on bogon with PID 8321 (/Users/feick/IdeaProjects/diagnosis/target/classes started by feick in /Users/feick/IdeaProjects/diagnosis)
+2019-08-31 13:53:04.278 logback [main] INFO  edu.math.diagnosis.BootApplication - The following profiles are active: dev
+2019-08-31 13:53:05.670 logback [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode!
+2019-08-31 13:53:05.672 logback [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode.
+2019-08-31 13:53:05.890 logback [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 208ms. Found 13 repository interfaces.
+2019-08-31 13:53:06.461 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$badb2a0b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:06.503 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$5388f245] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:06.509 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'objectPostProcessor' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:06.512 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@713ec32d' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:06.513 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$785d94f7] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:06.519 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:06.561 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'spring.redis-org.springframework.boot.autoconfigure.data.redis.RedisProperties' of type [org.springframework.boot.autoconfigure.data.redis.RedisProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:06.567 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.boot.autoconfigure.data.redis.LettuceConnectionConfiguration' of type [org.springframework.boot.autoconfigure.data.redis.LettuceConnectionConfiguration$$EnhancerBySpringCGLIB$$cff4e855] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:06.783 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'lettuceClientResources' of type [io.lettuce.core.resource.DefaultClientResources] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:06.911 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'redisConnectionFactory' of type [org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:06.914 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'redisConfig' of type [edu.math.diagnosis.config.RedisConfig$$EnhancerBySpringCGLIB$$29f5d7cc] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:07.243 logback [main] INFO  io.undertow.servlet - Initializing Spring embedded WebApplicationContext
+2019-08-31 13:53:07.243 logback [main] INFO  o.s.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 2924 ms
+2019-08-31 13:53:07.940 logback [main] INFO  o.s.b.a.l.ConditionEvaluationReportLoggingListener - 
+
+Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
+2019-08-31 13:53:49.783 logback [main] INFO  edu.math.diagnosis.BootApplication - Starting BootApplication on bogon with PID 8338 (/Users/feick/IdeaProjects/diagnosis/target/classes started by feick in /Users/feick/IdeaProjects/diagnosis)
+2019-08-31 13:53:49.785 logback [main] INFO  edu.math.diagnosis.BootApplication - The following profiles are active: dev
+2019-08-31 13:53:51.065 logback [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode!
+2019-08-31 13:53:51.066 logback [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode.
+2019-08-31 13:53:51.239 logback [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 166ms. Found 13 repository interfaces.
+2019-08-31 13:53:51.789 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$2c8dfd65] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:51.825 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$c53bc59f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:51.831 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'objectPostProcessor' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:51.834 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@91f565d' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:51.838 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$ea106851] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:51.843 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:51.882 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'spring.redis-org.springframework.boot.autoconfigure.data.redis.RedisProperties' of type [org.springframework.boot.autoconfigure.data.redis.RedisProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:51.888 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.boot.autoconfigure.data.redis.LettuceConnectionConfiguration' of type [org.springframework.boot.autoconfigure.data.redis.LettuceConnectionConfiguration$$EnhancerBySpringCGLIB$$41a7bbaf] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:52.067 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'lettuceClientResources' of type [io.lettuce.core.resource.DefaultClientResources] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:52.157 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'redisConnectionFactory' of type [org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:52.161 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'redisConfig' of type [edu.math.diagnosis.config.RedisConfig$$EnhancerBySpringCGLIB$$9ba8ab26] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 13:53:52.444 logback [main] INFO  io.undertow.servlet - Initializing Spring embedded WebApplicationContext
+2019-08-31 13:53:52.444 logback [main] INFO  o.s.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 2595 ms
+2019-08-31 13:53:53.191 logback [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
+2019-08-31 13:53:53.849 logback [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
+2019-08-31 13:53:53.914 logback [main] INFO  o.h.jpa.internal.util.LogHelper - HHH000204: Processing PersistenceUnitInfo [
+	name: default
+	...]
+2019-08-31 13:53:54.005 logback [main] INFO  org.hibernate.Version - HHH000412: Hibernate Core {5.3.7.Final}
+2019-08-31 13:53:54.007 logback [main] INFO  org.hibernate.cfg.Environment - HHH000206: hibernate.properties not found
+2019-08-31 13:53:54.209 logback [main] INFO  o.h.annotations.common.Version - HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
+2019-08-31 13:53:54.436 logback [main] INFO  org.hibernate.dialect.Dialect - HHH000400: Using dialect: org.hibernate.dialect.MySQL57Dialect
+2019-08-31 13:53:55.839 logback [main] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean - Initialized JPA EntityManagerFactory for persistence unit 'default'
+2019-08-31 13:53:56.577 logback [main] INFO  e.math.diagnosis.util.FormulaService - loading OMML2MML.XSL
+2019-08-31 13:53:56.961 logback [main] INFO  e.math.diagnosis.util.FormulaService - load OMML2MML.XSL finish
+2019-08-31 13:53:57.054 logback [main] INFO  edu.math.diagnosis.util.ExcelUtils - docpath: /Users/feick/IdeaProjects/diagnosis/target/classes/doc/ 
+2019-08-31 13:53:58.218 logback [main] INFO  o.s.b.a.e.web.EndpointLinksResolver - Exposing 17 endpoint(s) beneath base path '/actuator'
+2019-08-31 13:53:58.533 logback [main] INFO  io.lettuce.core.EpollProvider - Starting without optional epoll library
+2019-08-31 13:53:58.535 logback [main] INFO  io.lettuce.core.KqueueProvider - Starting without optional kqueue library
+2019-08-31 13:53:58.884 logback [main] INFO  s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity<springfox.documentation.spring.web.json.Json> springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)]
+2019-08-31 13:53:59.033 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/resources/**'], []
+2019-08-31 13:53:59.033 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/static/**'], []
+2019-08-31 13:53:59.033 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/**.js'], []
+2019-08-31 13:53:59.033 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/upload/**'], []
+2019-08-31 13:53:59.034 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/**/*.js'], []
+2019-08-31 13:53:59.034 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/lang/*.json'], []
+2019-08-31 13:53:59.034 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/**/*.css'], []
+2019-08-31 13:53:59.034 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/**/*.map'], []
+2019-08-31 13:53:59.034 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/**/*.png'], []
+2019-08-31 13:53:59.034 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/**/*.jpg'], []
+2019-08-31 13:53:59.034 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/open/**'], []
+2019-08-31 13:53:59.034 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/v2/api-docs'], []
+2019-08-31 13:53:59.034 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/swagger-resources/configuration/ui'], []
+2019-08-31 13:53:59.034 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/swagger-resources'], []
+2019-08-31 13:53:59.034 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/swagger-resources/configuration/security'], []
+2019-08-31 13:53:59.034 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/swagger-ui.html'], []
+2019-08-31 13:53:59.074 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@5a2ce458, org.springframework.security.web.context.SecurityContextPersistenceFilter@2d9cc10, org.springframework.security.web.header.HeaderWriterFilter@7b88dd58, org.springframework.security.web.authentication.logout.LogoutFilter@2fedf25b, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@35cc5b75, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@19cee7ed, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@38769b6c, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@3d2af8d7, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@1c8e1233, org.springframework.security.web.session.SessionManagementFilter@5dce3e82, org.springframework.security.web.access.ExceptionTranslationFilter@3207e6de, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@676beb9f]
+2019-08-31 13:53:59.361 logback [main] INFO  o.s.b.a.w.s.WelcomePageHandlerMapping - Adding welcome page: class path resource [static/index.html]
+2019-08-31 13:53:59.817 logback [main] INFO  s.d.s.w.p.DocumentationPluginsBootstrapper - Context refreshed
+2019-08-31 13:53:59.855 logback [main] INFO  s.d.s.w.p.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s)
+2019-08-31 13:53:59.899 logback [main] INFO  s.d.s.w.s.ApiListingReferenceScanner - Scanning for api listing references
+2019-08-31 13:54:00.105 logback [main] INFO  s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: deleteUsingGET_1
+2019-08-31 13:54:00.191 logback [main] INFO  s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: testUsingGET_1
+2019-08-31 13:54:00.733 logback [main] INFO  o.s.s.a.ScheduledAnnotationBeanPostProcessor - No TaskScheduler/ScheduledExecutorService bean found for scheduled processing
+2019-08-31 13:54:00.761 logback [main] INFO  org.xnio - XNIO version 3.3.8.Final
+2019-08-31 13:54:00.773 logback [main] INFO  org.xnio.nio - XNIO NIO Implementation Version 3.3.8.Final
+2019-08-31 13:54:00.854 logback [main] INFO  o.s.b.w.e.u.UndertowServletWebServer - Undertow started on port(s) 8085 (http) with context path ''
+2019-08-31 13:54:00.856 logback [main] INFO  edu.math.diagnosis.BootApplication - Started BootApplication in 11.6 seconds (JVM running for 12.072)
+2019-08-31 13:54:00.936 logback [main] INFO  o.h.h.i.QueryTranslatorFactoryInitiator - HHH000397: Using ASTQueryTranslatorFactory
+2019-08-31 13:54:20.933 logback [Thread-8] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default'
+2019-08-31 13:54:20.936 logback [Thread-8] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown initiated...
+2019-08-31 13:54:20.947 logback [Thread-8] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown completed.
+2019-08-31 15:25:28.247 logback [main] INFO  edu.math.diagnosis.BootApplication - Starting BootApplication on bogon with PID 8609 (started by feick in /Users/feick/OneDrive - m.scnu.edu.cn/Workspace/IdeaProjects/diagnosis)
+2019-08-31 15:25:28.252 logback [main] INFO  edu.math.diagnosis.BootApplication - The following profiles are active: dev
+2019-08-31 15:25:29.676 logback [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode!
+2019-08-31 15:25:29.678 logback [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode.
+2019-08-31 15:25:29.939 logback [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 250ms. Found 13 repository interfaces.
+2019-08-31 15:25:30.540 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$a4deffd1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 15:25:30.576 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$3d8cc80b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 15:25:30.583 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'objectPostProcessor' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 15:25:30.585 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@22bdb1d0' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 15:25:30.588 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$62616abd] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 15:25:30.594 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 15:25:30.635 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'spring.redis-org.springframework.boot.autoconfigure.data.redis.RedisProperties' of type [org.springframework.boot.autoconfigure.data.redis.RedisProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 15:25:30.641 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.boot.autoconfigure.data.redis.LettuceConnectionConfiguration' of type [org.springframework.boot.autoconfigure.data.redis.LettuceConnectionConfiguration$$EnhancerBySpringCGLIB$$b9f8be1b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 15:25:30.839 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'lettuceClientResources' of type [io.lettuce.core.resource.DefaultClientResources] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 15:25:30.963 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'redisConnectionFactory' of type [org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 15:25:30.967 logback [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'redisConfig' of type [edu.math.diagnosis.config.RedisConfig$$EnhancerBySpringCGLIB$$13f9ad92] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-08-31 15:25:31.300 logback [main] INFO  io.undertow.servlet - Initializing Spring embedded WebApplicationContext
+2019-08-31 15:25:31.300 logback [main] INFO  o.s.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 2981 ms
+2019-08-31 15:25:32.097 logback [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
+2019-08-31 15:25:32.761 logback [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
+2019-08-31 15:25:32.827 logback [main] INFO  o.h.jpa.internal.util.LogHelper - HHH000204: Processing PersistenceUnitInfo [
+	name: default
+	...]
+2019-08-31 15:25:32.925 logback [main] INFO  org.hibernate.Version - HHH000412: Hibernate Core {5.3.7.Final}
+2019-08-31 15:25:32.927 logback [main] INFO  org.hibernate.cfg.Environment - HHH000206: hibernate.properties not found
+2019-08-31 15:25:33.144 logback [main] INFO  o.h.annotations.common.Version - HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
+2019-08-31 15:25:33.355 logback [main] INFO  org.hibernate.dialect.Dialect - HHH000400: Using dialect: org.hibernate.dialect.MySQL57Dialect
+2019-08-31 15:25:34.766 logback [main] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean - Initialized JPA EntityManagerFactory for persistence unit 'default'
+2019-08-31 15:25:35.592 logback [main] INFO  e.math.diagnosis.util.FormulaService - loading OMML2MML.XSL
+2019-08-31 15:25:35.956 logback [main] INFO  e.math.diagnosis.util.FormulaService - load OMML2MML.XSL finish
+2019-08-31 15:25:36.048 logback [main] INFO  edu.math.diagnosis.util.ExcelUtils - docpath: /Users/feick/OneDrive%20-%20m.scnu.edu.cn/Workspace/IdeaProjects/diagnosis/target/classes/doc/ 
+2019-08-31 15:25:36.521 logback [main] INFO  o.s.b.a.e.web.EndpointLinksResolver - Exposing 17 endpoint(s) beneath base path '/actuator'
+2019-08-31 15:25:36.834 logback [main] INFO  io.lettuce.core.EpollProvider - Starting without optional epoll library
+2019-08-31 15:25:36.835 logback [main] INFO  io.lettuce.core.KqueueProvider - Starting without optional kqueue library
+2019-08-31 15:25:37.068 logback [main] INFO  s.d.s.w.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity<springfox.documentation.spring.web.json.Json> springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)]
+2019-08-31 15:25:37.206 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/resources/**'], []
+2019-08-31 15:25:37.206 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/static/**'], []
+2019-08-31 15:25:37.206 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/**.js'], []
+2019-08-31 15:25:37.206 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/upload/**'], []
+2019-08-31 15:25:37.206 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/**/*.js'], []
+2019-08-31 15:25:37.206 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/lang/*.json'], []
+2019-08-31 15:25:37.206 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/**/*.css'], []
+2019-08-31 15:25:37.206 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/**/*.map'], []
+2019-08-31 15:25:37.206 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/**/*.png'], []
+2019-08-31 15:25:37.206 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/**/*.jpg'], []
+2019-08-31 15:25:37.206 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/open/**'], []
+2019-08-31 15:25:37.206 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/v2/api-docs'], []
+2019-08-31 15:25:37.206 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/swagger-resources/configuration/ui'], []
+2019-08-31 15:25:37.206 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/swagger-resources'], []
+2019-08-31 15:25:37.207 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/swagger-resources/configuration/security'], []
+2019-08-31 15:25:37.207 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: Ant [pattern='/swagger-ui.html'], []
+2019-08-31 15:25:37.243 logback [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@8d0253b, org.springframework.security.web.context.SecurityContextPersistenceFilter@50cb64d5, org.springframework.security.web.header.HeaderWriterFilter@12ff3df, org.springframework.security.web.authentication.logout.LogoutFilter@54455c8d, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@54aacbc7, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@79f6b43a, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@3e1c566d, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@b61aa50, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@f61f06e, org.springframework.security.web.session.SessionManagementFilter@15844237, org.springframework.security.web.access.ExceptionTranslationFilter@65bc50c9, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@44b99f09]
+2019-08-31 15:25:37.584 logback [main] INFO  o.s.b.a.w.s.WelcomePageHandlerMapping - Adding welcome page: class path resource [static/index.html]
+2019-08-31 15:25:38.046 logback [main] INFO  s.d.s.w.p.DocumentationPluginsBootstrapper - Context refreshed
+2019-08-31 15:25:38.080 logback [main] INFO  s.d.s.w.p.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s)
+2019-08-31 15:25:38.126 logback [main] INFO  s.d.s.w.s.ApiListingReferenceScanner - Scanning for api listing references
+2019-08-31 15:25:38.355 logback [main] INFO  s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: deleteUsingGET_1
+2019-08-31 15:25:38.436 logback [main] INFO  s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: testUsingGET_1
+2019-08-31 15:25:38.983 logback [main] INFO  o.s.s.a.ScheduledAnnotationBeanPostProcessor - No TaskScheduler/ScheduledExecutorService bean found for scheduled processing
+2019-08-31 15:25:39.012 logback [main] INFO  org.xnio - XNIO version 3.3.8.Final
+2019-08-31 15:25:39.025 logback [main] INFO  org.xnio.nio - XNIO NIO Implementation Version 3.3.8.Final
+2019-08-31 15:25:39.107 logback [main] INFO  o.s.b.w.e.u.UndertowServletWebServer - Undertow started on port(s) 8085 (http) with context path ''
+2019-08-31 15:25:39.110 logback [main] INFO  edu.math.diagnosis.BootApplication - Started BootApplication in 11.515 seconds (JVM running for 12.024)
+2019-08-31 15:25:39.187 logback [main] INFO  o.h.h.i.QueryTranslatorFactoryInitiator - HHH000397: Using ASTQueryTranslatorFactory

+ 6 - 0
log/logback-warn-%d{yyyy-MM-dd}.log

@@ -2,3 +2,9 @@
 2019-08-29 20:28:57.748 logback [main] WARN  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.RuntimeException: java.nio.file.InvalidPathException: Illegal char <:> at index 2: /d:/diagnosis/uploadTemp/
 2019-08-29 20:29:26.290 logback [main] WARN  io.undertow.websockets.jsr - UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
 2019-08-29 20:29:32.046 logback [main] WARN  o.s.b.a.o.j.JpaBaseConfiguration$JpaWebConfiguration$JpaWebMvcConfiguration - spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
+2019-08-31 13:53:07.216 logback [main] WARN  io.undertow.websockets.jsr - UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
+2019-08-31 13:53:07.908 logback [main] WARN  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.RuntimeException: java.lang.NullPointerException
+2019-08-31 13:53:52.424 logback [main] WARN  io.undertow.websockets.jsr - UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
+2019-08-31 13:53:58.073 logback [main] WARN  o.s.b.a.o.j.JpaBaseConfiguration$JpaWebConfiguration$JpaWebMvcConfiguration - spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
+2019-08-31 15:25:31.270 logback [main] WARN  io.undertow.websockets.jsr - UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
+2019-08-31 15:25:36.366 logback [main] WARN  o.s.b.a.o.j.JpaBaseConfiguration$JpaWebConfiguration$JpaWebMvcConfiguration - spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning

+ 1 - 2
src/main/java/edu/math/diagnosis/controller/FileController.java

@@ -7,7 +7,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import org.springframework.http.ResponseEntity;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -22,7 +21,7 @@ import java.io.IOException;
 @RestController
 @RequestMapping("/file")
 @Api(tags = "文件管理")
-@PreAuthorize("hasRole('ROLE_ADMIN')")
+//@PreAuthorize("hasRole('ROLE_ADMIN')")
 public class FileController {
 
     @Resource

+ 27 - 0
src/main/java/edu/math/diagnosis/controller/PaperCommitController.java

@@ -0,0 +1,27 @@
+package edu.math.diagnosis.controller;
+
+import edu.math.diagnosis.entity.PaperCommit;
+import edu.math.diagnosis.model.Result;
+import edu.math.diagnosis.service.CommitService;
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+@Api(tags = "试卷提交")
+@RestController
+@RequestMapping("paper")
+public class PaperCommitController {
+
+    @Resource
+    private CommitService commitService;
+
+    @PostMapping("commit")
+    public Result commit(PaperCommit paperCommit){
+        commitService.commit(paperCommit);
+        return Result.fail();
+    }
+
+}

+ 1 - 2
src/main/java/edu/math/diagnosis/controller/PaperController.java

@@ -29,11 +29,10 @@ import java.util.List;
 @RestController
 @RequestMapping("/paper")
 @Api(tags = "试卷管理")
-
 public class PaperController {
 
     @Resource
-    PaperService paperService;
+    private PaperService paperService;
     //    @Resource
 //    private FileService fileService;
     @Resource

+ 1 - 2
src/main/java/edu/math/diagnosis/controller/QuestionController.java

@@ -9,7 +9,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
-import org.springframework.security.access.annotation.Secured;
 import org.springframework.util.FileCopyUtils;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
@@ -26,7 +25,7 @@ import java.util.concurrent.ExecutorService;
 @RestController
 @RequestMapping("/question")
 @Api(tags = "题目管理")
-@Secured("ROLE_ADMIN")
+//@Secured("ROLE_ADMIN")
 public class QuestionController {
     @Resource
     private QuestionService questionService;

+ 3 - 2
src/main/java/edu/math/diagnosis/controller/TempController.java

@@ -3,7 +3,7 @@ package edu.math.diagnosis.controller;
 import edu.math.diagnosis.model.GeneralInfo;
 import edu.math.diagnosis.model.Report;
 import edu.math.diagnosis.util.ExcelUtils;
-import org.springframework.security.access.prepost.PreAuthorize;
+import io.swagger.annotations.Api;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
@@ -13,9 +13,10 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
+@Api(tags = "获取报告信息")
 @RestController
 @RequestMapping("/getTempPapers")
-@PreAuthorize("hasRole('ROLE_ADMIN')")
+//@PreAuthorize("hasRole('ROLE_ADMIN')")
 public class TempController {
 
     @Resource

+ 6 - 4
src/main/java/edu/math/diagnosis/controller/TestController.java

@@ -9,6 +9,7 @@ import edu.math.diagnosis.entity.Question;
 import edu.math.diagnosis.model.AuthUser;
 import edu.math.diagnosis.util.ObjectUtils;
 import edu.math.diagnosis.util.SecurityUtil;
+import io.swagger.annotations.Api;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -26,18 +27,19 @@ import java.util.concurrent.atomic.AtomicLong;
  * @DATE: Create in 2018/6/29 17:18
  * @DESCRIPTION:
  */
+@Api(tags = "测试")
 @RestController
 public class TestController {
     @Resource
-    OptionRepo optionRepo;
+    private OptionRepo optionRepo;
     @Resource
-    QuestionRepo questionRepo;
+    private QuestionRepo questionRepo;
 
     @Resource
-    CommitRepo commitRepo;
+    private CommitRepo commitRepo;
 
     @Resource
-    CommitController commitController;
+    private CommitController commitController;
 
     private AtomicLong visitCount = new AtomicLong();
 

+ 5 - 1
src/main/java/edu/math/diagnosis/controller/UserInfoController.java

@@ -1,9 +1,10 @@
 package edu.math.diagnosis.controller;
 
-import edu.math.diagnosis.config.ConfigConstants;
 import edu.math.diagnosis.entity.UserInfo;
 import edu.math.diagnosis.model.AuthUser;
 import edu.math.diagnosis.util.SecurityUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
@@ -11,6 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
 import java.util.ArrayList;
 import java.util.List;
 
+@Api(tags = "用户信息")
 @RestController
 @RequestMapping("/self")
 public class UserInfoController {
@@ -21,6 +23,7 @@ public class UserInfoController {
      *
      * @return
      */
+    @ApiOperation("获取用户权限")
     @GetMapping("/authority")
     public List<String> getAuthorities() {
         AuthUser user = SecurityUtil.getCurrentUser();
@@ -37,6 +40,7 @@ public class UserInfoController {
      *
      * @return
      */
+    @ApiOperation("获取用户信息")
     @GetMapping("/info")
     public UserInfo getInfo() {
         AuthUser user = SecurityUtil.getCurrentUser();

+ 2 - 0
src/main/java/edu/math/diagnosis/controller/UserManagerController.java

@@ -3,6 +3,7 @@ package edu.math.diagnosis.controller;
 import edu.math.diagnosis.entity.UserInfo;
 import edu.math.diagnosis.service.UserService;
 import edu.math.diagnosis.util.Constants;
+import io.swagger.annotations.Api;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
@@ -13,6 +14,7 @@ import java.util.Date;
  * @DATE: Create in 2018/8/25 17:53
  * @DESCRIPTION:
  */
+@Api(tags = "用户管理")
 @RestController
 @RequestMapping("/user")
 public class UserManagerController {

+ 0 - 3
src/main/java/edu/math/diagnosis/dao/RoleRepo.java

@@ -1,11 +1,8 @@
 package edu.math.diagnosis.dao;
 
-import edu.math.diagnosis.entity.Commit;
 import edu.math.diagnosis.entity.Role;
 import org.springframework.data.jpa.repository.JpaRepository;
 
-import java.util.List;
-
 public interface RoleRepo extends JpaRepository<Role, Long> {
 
 }

+ 14 - 6
src/main/java/edu/math/diagnosis/entity/PaperCommit.java

@@ -1,5 +1,6 @@
 package edu.math.diagnosis.entity;
 
+import edu.math.diagnosis.model.Answer;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import org.hibernate.annotations.CreationTimestamp;
@@ -7,7 +8,6 @@ import org.hibernate.annotations.CreationTimestamp;
 import javax.persistence.*;
 import java.util.Date;
 import java.util.List;
-import java.util.Map;
 
 /**
  * @AUTHOR: DaiFengWen
@@ -33,6 +33,14 @@ public class PaperCommit {
     @Lob
     @Column(nullable = false)
     @ApiModelProperty("答案json化")
+    /**
+     * [{
+     *     "useTime":1,
+     *     "qid":1,
+     *     "number":1,
+     *     "answer":"AB"
+     * }]
+     */
     private String jsonAns;
 
     @CreationTimestamp
@@ -52,7 +60,7 @@ public class PaperCommit {
     @Column(nullable = false)
     private Date endTime;
     @Transient
-    private Map<Long, List<Long>> ans;
+    private List<Answer> answers;
 
     public Long getId() {
         return id;
@@ -110,12 +118,12 @@ public class PaperCommit {
         this.generateReport = generateReport;
     }
 
-    public Map<Long, List<Long>> getAns() {
-        return ans;
+    public List<Answer> getAnswers() {
+        return answers;
     }
 
-    public void setAns(Map<Long, List<Long>> ans) {
-        this.ans = ans;
+    public void setAnswers(List<Answer> answers) {
+        this.answers = answers;
     }
 
     public int getUseTime() {

+ 59 - 59
src/main/java/edu/math/diagnosis/entity/PaperResult.java

@@ -27,18 +27,18 @@ public class PaperResult {
     @CreationTimestamp
     @Column(nullable = false)
     private Date createtime;
-    @Column(nullable = false, columnDefinition = "double(10,2) default 0")
-    private Double score1;
-    @Column(nullable = false, columnDefinition = "double(10,2) default 0")
-    private Double score2;
-    @Column(nullable = false, columnDefinition = "double(10,2) default 0")
-    private Double score3;
-    @Column(nullable = false, columnDefinition = "double(10,2) default 0")
-    private Double score4;
-    @Column(nullable = false, columnDefinition = "double(10,2) default 0")
-    private Double score5;
-    @Column(nullable = false, columnDefinition = "double(10,2) default 0")
-    private Double score6;
+//    @Column(nullable = false, columnDefinition = "double(10,2) default 0")
+//    private Double score1;
+//    @Column(nullable = false, columnDefinition = "double(10,2) default 0")
+//    private Double score2;
+//    @Column(nullable = false, columnDefinition = "double(10,2) default 0")
+//    private Double score3;
+//    @Column(nullable = false, columnDefinition = "double(10,2) default 0")
+//    private Double score4;
+//    @Column(nullable = false, columnDefinition = "double(10,2) default 0")
+//    private Double score5;
+//    @Column(nullable = false, columnDefinition = "double(10,2) default 0")
+//    private Double score6;
 
     @Lob
     @Column(nullable = false)
@@ -96,53 +96,53 @@ public class PaperResult {
         this.createtime = createtime;
     }
 
-    public Double getScore1() {
-        return score1;
-    }
-
-    public void setScore1(Double score1) {
-        this.score1 = score1;
-    }
-
-    public Double getScore2() {
-        return score2;
-    }
-
-    public void setScore2(Double score2) {
-        this.score2 = score2;
-    }
-
-    public Double getScore3() {
-        return score3;
-    }
-
-    public void setScore3(Double score3) {
-        this.score3 = score3;
-    }
-
-    public Double getScore4() {
-        return score4;
-    }
-
-    public void setScore4(Double score4) {
-        this.score4 = score4;
-    }
-
-    public Double getScore5() {
-        return score5;
-    }
-
-    public void setScore5(Double score5) {
-        this.score5 = score5;
-    }
-
-    public Double getScore6() {
-        return score6;
-    }
-
-    public void setScore6(Double score6) {
-        this.score6 = score6;
-    }
+//    public Double getScore1() {
+//        return score1;
+//    }
+//
+//    public void setScore1(Double score1) {
+//        this.score1 = score1;
+//    }
+//
+//    public Double getScore2() {
+//        return score2;
+//    }
+//
+//    public void setScore2(Double score2) {
+//        this.score2 = score2;
+//    }
+//
+//    public Double getScore3() {
+//        return score3;
+//    }
+//
+//    public void setScore3(Double score3) {
+//        this.score3 = score3;
+//    }
+//
+//    public Double getScore4() {
+//        return score4;
+//    }
+//
+//    public void setScore4(Double score4) {
+//        this.score4 = score4;
+//    }
+//
+//    public Double getScore5() {
+//        return score5;
+//    }
+//
+//    public void setScore5(Double score5) {
+//        this.score5 = score5;
+//    }
+//
+//    public Double getScore6() {
+//        return score6;
+//    }
+//
+//    public void setScore6(Double score6) {
+//        this.score6 = score6;
+//    }
 
     public String getJsonScore() {
         return jsonScore;

+ 44 - 0
src/main/java/edu/math/diagnosis/model/Answer.java

@@ -0,0 +1,44 @@
+package edu.math.diagnosis.model;
+
+import io.swagger.annotations.ApiModel;
+
+@ApiModel("答案")
+public class Answer {
+
+    private Long qid;
+    private Long useTime;
+    private String answer;
+    private Integer number;
+
+    public Long getQid() {
+        return qid;
+    }
+
+    public void setQid(Long qid) {
+        this.qid = qid;
+    }
+
+    public Long getUseTime() {
+        return useTime;
+    }
+
+    public void setUseTime(Long useTime) {
+        this.useTime = useTime;
+    }
+
+    public String getAnswer() {
+        return answer;
+    }
+
+    public void setAnswer(String answer) {
+        this.answer = answer;
+    }
+
+    public Integer getNumber() {
+        return number;
+    }
+
+    public void setNumber(Integer number) {
+        this.number = number;
+    }
+}

+ 14 - 7
src/main/java/edu/math/diagnosis/service/CommitService.java

@@ -3,6 +3,7 @@ package edu.math.diagnosis.service;
 import edu.math.diagnosis.dao.*;
 import edu.math.diagnosis.entity.*;
 import edu.math.diagnosis.model.QuestionDetail;
+import edu.math.diagnosis.model.Result;
 import edu.math.diagnosis.util.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
@@ -42,7 +43,8 @@ public class CommitService {
 
         commit.setCreatetime(new Date());
         commit.setGenerateReport(true);
-        Map<Long, List<Long>> ans = commit.getAns();
+//        Map<Long, List<Long>> ans = commit.getAns();
+        Map<Long, List<Long>> ans = new HashMap<>();
         commit.setJsonAns(ObjectUtils.Object2Json(ans));
         List<QuestionDetail> questionDetails = new ArrayList<>(20);
         for (Map.Entry<Long, List<Long>> entry : ans.entrySet()) {
@@ -81,11 +83,16 @@ public class CommitService {
     private void fillPaperResultScore(PaperResult result, List<QuestionDetail> details) {
         List<Double> scores = getScores(details);
         result.setScore(scores.get(0));
-        result.setScore1(scores.get(1));
-        result.setScore2(scores.get(2));
-        result.setScore3(scores.get(3));
-        result.setScore4(scores.get(4));
-        result.setScore5(scores.get(5));
-        result.setScore6(scores.get(6));
+//        result.setScore1(scores.get(1));
+//        result.setScore2(scores.get(2));
+//        result.setScore3(scores.get(3));
+//        result.setScore4(scores.get(4));
+//        result.setScore5(scores.get(5));
+//        result.setScore6(scores.get(6));
+    }
+
+    public Result commit(PaperCommit paperCommit){
+
+        return Result.fail();
     }
 }